NYCPHP Meetup

NYPHP.org

[nycphp-talk] One more question about Friendly URLS

Jiju Thomas Mathew lists at silmail.com
Fri Mar 9 06:18:59 EST 2007


>
> It seems that relative links to CSS and JS all suddenly break.  So if
> you have:
>
> www.example.com/friendly/varname/varvalue/varname/varvalue
>
> and you have a link to "css/main.css", then it will not be able to find
> the style sheet anymore.
>
>
The method used by me to salvage this kind of coding (bad though, but get it
working fast), is to use
Apache mod_rewrite, with a top level htaccess containing the following

RewriteCond %{REQUEST_FILENAME} ! -f
RewriteRule (.*)/css/(.*) css/$2 [L]

-- 
Jiju Thomas Mathew
http://www.php-trivandrum.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070309/253c5cc7/attachment.html>


More information about the talk mailing list