Forum Moderators: phranque
E.g.
/images/image.jpg will be rewritten as
/new/images/image.jpg
Now, the thing is, I want this to apply to all PHP include() and require() statements. Is this possible with htaccess? I suspect it may not be.
I am currently trying to use:
RewriteRule \/(.*) /new/$1 [L]
But I think this will only work for whole page requests, not for include files.
Any suggestions?
Thanks, Prem.
The includes are handled in the filespace of the server, and not in Web URL space, so mod_rewrite won't help there. You might want to look into symlinks for your solution.
If you code is intended for use in .htaccess, I'd recommend:
RewriteCond %{REQUEST_URI} !^/new
RewriteRule ^(.*) /new/$1 [L]
Jim
{edited] Fix typo [/edited]
[edited by: jdMorgan at 5:12 pm (utc) on Oct. 8, 2004]