httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gushlow <nick.gush...@westcoast.co.uk>
Subject [users@httpd] mod_rewrite problem
Date Fri, 19 Aug 2005 08:32:43 GMT
Hey guys,

I've got a working set of conditions and a rule, but I'm struggling to
add another condition/rule.

The code below is working and turns any request for http://domain/word
into http://domain/index.php?site=$1 

RewriteLog /var/www/epp/logs/epp.rewrite.log
RewriteLogLevel 9
RewriteEngine on
RewriteCond %{REQUEST_URI} !^.*\.php
RewriteCond %{REQUEST_URI} !^.*\.gif
RewriteCond %{REQUEST_URI} !^.*\.jpg
RewriteCond %{REQUEST_URI} !^.*\.htm
RewriteCond %{REQUEST_URI} !^.*\.html
RewriteCond %{REQUEST_URI} !^.*\.css
RewriteCond %{REQUEST_URI} !^.*\.js
RewriteCond %{REQUEST_URI} !^.*\.doc
RewriteCond %{REQUEST_URI} !^.*\.pdf
# Rewrite URL
RewriteRule /([^/]*)$ /index.php?epp=$1         [L]



I want to add a condition so that it skips the word abbey and continues
as normal - eg http://domain/abbey just reads the abbey directory in
htdocs - so I added


RewriteCond %{REQUEST_URI} !^.*abbey(.*)


It seems to partially work, in mozilla it seems to work, but in IE I
just get page cannot be displayed.

Adding the trailing slash makes it work, so I'm guessing that mozilla
has programming to auto try a trailing slash if it gets page not found.

Question is, what is wrong with my condition/rules that apache is not
adding the trailing slash?  -- note this is a virtual server and the
other virtual servers on the same apache all handle the missing trailing
slash so it's definitely something to do with my rewrite rules.

Any help appreciated.

Thanks,

Nick.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message