I've been trawling this forum for a while now whenever I get problems with mod rewrite, but this is the first problem I haven't been able to solve.
I have a relatively simple rewrite rule which basically takes any request not directed to one of a few selected files, and sends the request to /index.php
RewriteEngine on
RewriteCond %{REQUEST_URI} !=/init.js
RewriteCond %{REQUEST_URI} !=/index.php
RewriteCond %{REQUEST_URI} !=/ajax.php
RewriteCond %{REQUEST_URI} !=/file.php
RewriteCond %{REQUEST_URI} !=/img.php
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^\.*$ /index.php [L]
It works, mostly.
every page loads /init.js and this is where the problems come in.
If I go to / it works fine.
If I go to /home or /blog it works fine.
But once I get more then one 'directory' deep, such as /blog/darkrose /init.js gets pointed to /index.php and hence my javascript doesn't get loaded.
The src value of the script tag is an absolute path "/init.js" not "init.js", but the problem is still occuring.
Any ideas?