I use mod_rewrite and a simple rewrite rule to redirect all requests to a single PHP script. That script is how I'm doing URL rewriting, it parses the URL and determines which page or script to display.
The script uses include() statements to load whichever script is required. In those included scripts, all URL references currently have to be relative to the location of the PHP rewrite script.
(simplified example)
The script is located at C:\htdocs\
In a browser I enter the url: http://localhost/main/page1/
The the rewrite rule calls the script, and it includes page1.php which is located in C:\htdocs\main\
Currently, to display an image in page1.php, the source path has to be "/main/image1.gif", "image1.gif"
Is there any way to tell the browser that page1.php is actually in "main" so that url references within page1.php don't have to be relative to root?