StupidScript - 8:11 pm on Jul 20, 2010 (gmt 0)
One quick note:
Originally in my index.php that displays the dynamic content, I had the following style and script references:
<link rel="stylesheet" type="text/css" href="style.css" />
Using Apache's mod_rewrite as I have done, above, broke those references.
I noticed that the PHP include files I was using on that page were coming in just fine. I also noticed that in their invocation, the paths were less-relative ... actually direct filesystem references (/var/ etc.) instead of web-directory references (/images etc.) Of course, that is how PHP include paths go ... but what if Apache was having a hard time resolving the relative paths to the style and script files? Maybe Apache needed a little more help than usual ...
So I modified the style and script references to add a little extra help for Apache:
<link rel="stylesheet" type="text/css" href="/style.css" />
Both paths now include a root web directory reference ("/"), and not just the file names using paths relative to index.php.
These changes fixed it right up.
Just incidentally, I had originally been working on this with the target directory as an Apache alias, but I saw that the rewrite processes were appending the DocumentRoot path to the start of all the resolved paths. I moved everything into the DocumentRoot, added the leading slashes to the style and script references, and now everything works as expected.
I think this little fix is an indication that if you are having trouble getting the rewrite paths ironed out, try removing the extra path info while you troubleshoot, and do everything from your DocumentRoot. Better to remove that particular issue than to let it tie you up while you're figuring everything out.