0

I have a few sites that I want to move to a development server that all have hard coded values that look for static files at /.

Is it possible if I read the HTTP_REFERER variable to reveal example.com/website1 to forward all requests to example.com/website1 instead of example.com/? How would I do this?

1 Answer 1

1

I think you are looking for something like this:

RewriteEngine On
RewriteCond %{HTTP_REFERER} website1
RewriteRule (.*) http://otherdomain.com%{REQUEST_URI}

If a request is made where the referer includes website1 (a test directory on a development server?) it will make the same request on another domain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .