Web Servers General Talk - Apache URL Rewriting

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers General Talk > July 2004 > Apache URL Rewriting





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apache URL Rewriting
B. Heller

2004-07-26, 6:05 pm

Hello,

I've the following problem:

I want my Apache to rewrite

http://*/engine/arg1/val1/arg2/val2/.../test.php (or html, htm, ...)
to
http://*/engine.php?arg1=val1&arg2=....&file=test.php (...)

The * stands for any host and the URL should be able to contain a
variable count of arguments.

For my local IIS test server I already got a solution:

RewriteRule (.*/engine)(\?[^/]*)?/([^/]*)/([^/]*)(.*?)
$1(?2$2&:\?)$3=$4$5 [N,I]
RewriteRule (.*/engine)(\?[^/]*)?/(.*) $1.php(?2$2&:\?)file=$3 [I,L]

Okay, with the Apache I've to replace the I with NC (case insensitive)
but that's not the fault. The Apache doesn't understand these rules
and dies on reload.

mod_rewrite is correctly installed and is working, I'm already using
it for some other things.

I just can't get a solution for the case explained above, can anybody
help me?

Greets and thanks,

B. Heller
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com