Reputation: 6565
I have a htaccess with this content:
RewriteEngine on
RewriteBase /new/
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^(.*)\.(jpg|css|js|gif|png)$ [NC]
RewriteRule ^(.*)$ index.php?page=$1 [L]
The URL im working on is some like:
http://www.example.xy/new/
When I call a link like this:
<a href="aaa/bbb/ccc">test</a>
URL should come up with
http://www.example.xy/new/aaa/bbb/ccc
Problem is, no matter what I do, all my css, js, and images are gone because I have them included like
<link href="style.css" ... />
this ends up in
<link href="aaa/bbb/ccc/style.css" ... />
how can I deny this or what am I doing wrong?
My .htaccess is based on several tutorials and some qoogle searched posts...
Upvotes: 1
Views: 19
Reputation: 24478
RewriteCond seams not to work well
works fine, It's the implementation
Add this to your html head section to fix your css, js problem.
<base href="http://www.yoursite.com" />
Upvotes: 2