Apache rewrite with many slash not working?
- by Daok
I have modified a website with a redirection to a single page:
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
It works as it suppose to be. Everything is redirected to index.php. Here is a working example that display index.php with all images and css:
http://.....com/section1
The problem occur when I try :
http://....com/section1/subsection
The page is redirected to index.php, BUT no images, no css, no javascript. Inside the PHP script everything is like this directly linked to the images or css or javascript like:
<img src="images/images1.png> ... <img src="images2.png">
Why does url with many slash like .com../123/123/whatever does not work with images, css or javascript when .com/no_slash_url works?