I have this .htaacces:
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
RewriteEngine on
RewriteRule \.(css|jpe?g|gif|png)$ - [L]
RewriteRule ^([A-Za-z-]+)/?$ index.php?page=$1 [NC,L]
and I have a link on my page:
<a href="store/">Store</a>
Content loads, but css file is not loaded correctly, it’s loaded as it was in /store/ directory. I know I could use absolute link, but I don’t want to.
So, shortly:
http://www.example.com/store everything works great
http://www.example.com/store/ php looks into /store/ folder, which is wrong
How to make it work in both ways? Please help.
only right way is to use absolute link – otherwise cache will not work propertly and your page will be loading slowly.
Other way is to catch any request for file “somefile.css” and rewrite it to your css – but it will cause problem with cache