I'm encountering a 301 problem from my pre-production site which is automatically redirected to my production site. I know the problem comes from WP because I already launched a curl in order to see responses either :
1) targeting the WP pre-production-site :
> GET / HTTP/1.1
> Host: www.pre-production-site.com
> User-Agent: curl/7.53.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 07 Mar 2017 11:51:19 GMT
< Server: Apache/2.2.22
< Location: http://www.production-site.com/
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: sameorigin
< Vary: Accept-Encoding
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host www.pre-production-site.com left intact
2) targeting my own .php file uploaded on the pre-production-site :
> GET /up.php HTTP/1.1
> Host: www.pre-production-site.com
> User-Agent: curl/7.53.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 07 Mar 2017 11:54:29 GMT
< Server: Apache/2.2.22
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: sameorigin
< Vary: Accept-Encoding
< Content-Length: 2
< Content-Type: text/html; charset=UTF-8
<
42* Connection #0 to host www.pre-production-site.com left intact
I don't understand because I've already checked :
- .htaccess file : doesn't contain any kind of redirection
- Apache configuration files : seems OK too
- source code (if a plugin would sets a Location: header) with a recursive grep : didn't find anything
Where is set this 301 ? I'm not sure if I left all informations that you need so feel free to ask me !
Thank you very much for your help !