On Tue, 5 Feb 2008, Cliff Hirsch wrote:
> For pretty urls, I have set up mod_rewrite like so:
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(.*)$ index.php?$1
>
> For a page like www.domain.com/faq the controller captures the faq command
> and everything works fine.
>
> But for www.domain.com/faq/ the images, css and javascript files are all
> missing. They are all set up as relative links. I¹m assuming that there are
> now relative to the /faq directory, which does not exist. Is this a
> side-effect of mod_rewrite? If so, how do you prevent it? Make all images,
> css and JS files absolute links or always relative to root?
You probably need to add a rule (or rules) before the one above (and also
use L to shortcircuit the rest of the rules) when dealing with you faq
folder and images/css.
--
Aj.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php