Find a Bug in Apache

New to mod_rewrite? This is a good place to start.

Find a Bug in Apache

Postby sdf » Sun Oct 10, 2004 10:59 pm

Here the testing enviroment: Linux Apache 1.3 and Windows Apache 1.3. Here is the problem:

Code: Select all
RewriteEngine On

RewriteOptions MaxRedirects=10

RewriteBase /apf4

RewriteCond %{REQUEST_URI} !^/apf4/feed\.cgi
RewriteRule ^(.*)$ /apf4/feed.cgi?$1 [L]


/apf4/What
in linux will become
/apf4/feed.cgi?What
in Windows will become
/apf4/feed.cgi?what

Now I changed the windows codes to

Code: Select all
RewriteEngine On

RewriteOptions MaxRedirects=10

RewriteBase /apf4

RewriteCond %{REQUEST_URI} !^/apf4/feed\.cgi
RewriteRule ^feed(.*)$ /apf4/feed.cgi?$1 [L]

LOOK there is NO / after feed in the last line

/apf4/feedWhat
in Windows will become
/apf4/feed.cgi?what
but
/apf4/feed/What
will become
/apf4/feed.cgi?/What

Can you see the problems here? Windows Apache mod rewrite is case insenstive except in one situation.
How do I make a mod rewrite file cross plateforms?



http://www-web-hosting.info/
sdf
 

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 68 guests

cron