R – htaccess rewrite rule not loading site content

.htaccessapachemod-rewrite

I am struggling with .htaccess rewrite rules.
Let's say I have this URL.

localhost/site/index.php

and I want to rewrite it as this URL

localhost/site/tutorial

I would use this RewriteRule

Options +FollowSymLinks
RewriteEngine on

RewriteRule ^tutorial/(.*)$ /up/index.php

The page works, but the CSS files don't load.

Also, if I have a URL like this:

index.php?page=home

Then I would have to parse through that URL to get 'home' not using $_GET anymore correct??

Best Answer

Just use absolute URLs for your CSS file, or at least reference from domain root.

http://www.mysite.com/css/myCssFile.css

or

/css/myCssFile.css
Related Topic