Skip to content Skip to sidebar Skip to footer

Stylesheet Does Not Load After Using Rewriterule And Include

I have a website that has an index.php, a few simple .html pages and one .php page (contact form) as well as a .htaccess file. On my website I have buttons that point to the pages

Solution 1:

If the stylesheet is being included using a relative path, then that would be the problem. Try using: /path/to/style.css rather than relative/path/to/style.css

So if your stylesheet lives in templates/style.css and you reference it as such, when you rewrite the URL http://www.site.com/index.php?page=welcome to http://www.site.com/welcome/, the stylesheet's path is relative to that:

http://www.site.com/welcome/templates/style.css

Solution 2:

You might be including it with a relative path? When your'e using ./ you are trying to include something from the new (non excistent?) /welcome dir.

Try to include your stuff trough the complete path, or use some sort of variable that tells you the real basepath.

Post a Comment for "Stylesheet Does Not Load After Using Rewriterule And Include"