[RESOLVED] mod_rewrite for SEO-Friendly URLs and relative path issue fixes?
Not really sure this is the correct forum but then I'm not 100% there is one for Apache stuff.
So I would like to introduce SEO-Friendly URLs, i.e. turn
And I have the code for that for the .htaccess file
This works fine except that it screws up all my image and style sheet references, which are relative urls: "../images/xxxx.jpg" or "../styles/css.css".
RewriteRule ^article/([0-9]+)/(.*?)$ /article.php?id=$1
Reading around it looks like the answer its to hard code them to an absolute path, i.e. http://server.com/styles/css.css
Is this really the only way or is there a complex way to do it with the rewrite engine?
put between your <head>section <base href="http://server.com/">
maybe this will help you
Painless! Thanks a lot.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)