lucy24 - 7:09 pm on Apr 16, 2013 (gmt 0)
OK. I've just deleted a massive post containing the latest version of
I don't get it :: whine ::
as the shoe finally drops and I understand that there are two layers of rewriting involved.
FIRST you've got your users at www.example.com being secretly rewritten to receive content that lives at
AND THEN you've got your overloaded server with a top-level directory currently containing
and you want to shovel all those directories into a single /www/ directory which can then quietly bloat up with
and so on until the cows come home, without making it impossible for you to find stuff in the root.
Have I NOW got it right?
The form "browser URL" is confusing because supporting files don't have browser URLs-- that is, the user doesn't normally see where they're coming from. (Obvious example: Unless you look at the code, you have no idea why a page consisting entirely of hotlinks takes soooo long to load up.) But the browser knows where it's requesting them from, so by keeping it as a rewrite instead of a redirect, you save the browser from having to make a fresh request every single time.
Right so far?
So the first piece of the request-- the piece that contains the directory name-- is thrown away in the case of shared files. But how did it get into the request in the first place? If it didn't come from htaccess, it must have come from php. And why is php adding something that isn't going to be used?
See, I've got this lurking suspicion that this isn't an apache issue at all. It may be better solved at the php level. Unless you're particularly concerned about human users snooping into the html and finding the "real" paths laid bare before their eyes.
It keeps coming back to: Obviously the solution doesn't simply involve
because you would have worked that out for yourself without all those sleepless nights ;)