I’m using rewrites to neaten my urls and for ease of coding because as you’ll see, I was forced to create a deeply nested folder structure. I use this rule set
RewriteEngine On
RewriteBase /base/
RewriteRule sys/admin root/system/exchange/graphical/index.php [L]
RewriteRule sys/graphical/(.+)$ root/system/exchange/graphical/$1 [QSA,L]
RewriteRule sys/action/(.+)$ root/system/exchange/action/$1 [QSA,L]
RewriteRule sys/images/(.+)$ root/system/exchange/graphical/data/img/$1 [QSA,L]
so when I type foo.com/base/sys/admin apache correctly rewrites to foo.com/base/root/system/exchange/graphical/index.php.
From there I include several things
<link href="graphical/data/compiler.php?type=css" type="text/css" rel="stylesheet"/>
<link rel="shortcut icon" href="images/favicon.ico">
<script src="graphical/data/compiled/libraries.js" type="text/javascript"></script>
<script src="graphical/data/compiler.php?type=js" type="text/javascript"></script>
ALL of these work correctly EXCEPT the link for the favicon and I cannot figure out why.
EXAMPLE:
graphical/data/compiler.php?type=js is correctly rewritten to /root/sys/graphical/data/compiler.php?type=js
In search of a solution I used RegExr http://gskinner.com/RegExr/ and htaccess Tester http://htaccess.madewithlove.be/. Both sites told me what my logic provided as well: THIS SHOULD WORK!
So I manually went to foo.com/base/sys/images/favicon.ico, which should have been rewritten to foo.com/base/root/system/exchange/graphical/data/img/favicon.ico for all I know. But it didn’t.
Thanks in advance for your ideas.