From the Apache 2.0 docs:
- Solution:
-
The solution to this subtle problem is to let the server add the trailing slash automatically. To do this correctly we have to use an external redirect, so the browser correctly requests subsequent images etc. If we only did a internal rewrite, this would only work for the directory page, but would go wrong when any images are included into this page with relative URLs, because the browser would request an in-lined object. For instance, a request for
image.gifin/~quux/foo/index.htmlwould become/~quux/image.gifwithout the external redirect!So, to do this trick we write:
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^foo$ foo/ [R]The crazy and lazy can even do the following in the top-level
.htaccessfile of their homedir. But notice that this creates some processing overhead.RewriteEngine on
RewriteBase /~quux/
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]
Sean Cribbs
seancribbs.com
Hi,
I have a site, http://uk.tug.org/ , that has some 'file' URIs such as
http://uk.tug.org/activities
http://uk.tug.org/baskerville
and some 'directory' URIs such as
http://uk.tug.org/Activities/
http://uk.tug.org/Baskerville/
Since Radiant is case sensitive, I would expect visiting
http://uk.tug.org/Activities
to 301 redirect to
http://uk.tug.org/Activities/
as normally happens with Apache.
However, this is not working with the default Radiant .htaccess in place.
I have asked my host's support team if there was something in their
server level apache configuration that would alter things, but there
isn't - if I move the .htaccess to .htaccess.old then the directory
behavior works as normal.
I am totally stumped :-)
--
Regards,
Dave
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
