I'm trying to permanently redirect all requests to my root directory to another site. I don't want anything other than the root requests to be redirected.
I can get this working with the following:
RewriteEngine On Rewriterule ^/$ http://www.example2.com/blah [L,R=301]
Everything seems to work fine (all requests other than root remain not redirected). Except that one particular type of request doesn't work.
I have a PHP script that runs at "http://www.example.com/phpscript"
Requests to that script have an extra component in the url like "http://www.example.com/phpscript/blah"
I strip out the /blah part within the PHP script and return an gif image based on the request. This may be the source of my problem. Requests to this url don't work with my above rewriterule.
Any ideas? Thanks in advance.