Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have one virtual host on my machine, which I am accessing localy. I am running apache2 under windows 7.

When accessing this host, I see in Fiddler, that server redirects browser to different remote site with response

301 Moved Permanently

But I am absolutely can't find where is it configured. I search all .htaccess files for the URL of target site, all files in the given virtual host for this URL, all Apache directory...

How to trace what causes Apache to do this redirection?

share|improve this question

1 Answer 1

It's not necessarily Apache's configuration that's doing this - is Apache handing the request off to a dynamic content generator?

Look for two things in your Apache config; Redirect, and RewriteRule directives that have an R flag. If those aren't in place, then Apache isn't doing the redirect (with the exception of /directoryname redirecting to /directoryname/, but that doesn't sound like the case here), and you'll need to look at the dynamic code that Apache's handing the request to.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.