I have a really strange "problem". I tryed to check my main page from the site (http://www.zen-slim.com/) with some online redirect tools and i got a strange "reaction" from them.
As you could see in the pictures, on this particular tool, i receive two 302 redirects and then a 200 (which i think it should have been the normal thing, as the site is working and operational). I tryed to check the header responses with curl and fsocketopen and i got 200 responses from both of them. But the online tools say something different. My .htaccess file is http://pastebin.com/Wgjxrq83.
Could you please help, because i really don't know what's wrong with it.
Thank you.
I was, finally, being able to figure this out. Aparently, the following code from .htaccess file was the problem:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
and changed it to this:
RewriteCond %{HTTP_HOST} zen-slim\.com [NC]
RewriteRule ^(.*)$ http://www.zen-slim.com/$1 [R=301,L]
This is definitely a strange behaviour.
Whichever software you use, your site runs a check on first request and testates and injects something with a drive-by-redirect on first request.
$ curl -Iv http://www.zen-slim.com/
* About to connect() to www.zen-slim.com port 80 (#0)
* Trying 46.252.196.1... connected
* Connected to www.zen-slim.com (46.252.196.1) port 80 (#0)
> HEAD / HTTP/1.1
> User-Agent: curl/7.21.6 (i386-pc-win32) libcurl/7.21.6 OpenSSL/0.9.8r zlib/1.2.5
> Host: www.zen-slim.com
> Accept: */*
>
< HTTP/1.1 302 Moved Temporarily
HTTP/1.1 302 Moved Temporarily
< Content-Length: 0
Content-Length: 0
< Location: /?9cc38870
Location: /?9cc38870
<
* Connection #0 to host www.zen-slim.com left intact
* Closing connection #0
Or via http://blooming-mountain-4729.herokuapp.com/web/shorturl.php?http://www.zen-slim.com/
Original URL: http://www.zen-slim.com/
Resulting URL: /
Status code (after all redirects): 403
Number of responses: 3
Number of redirects: 2
* http://www.zen-slim.com/ -- 302 --> /?07731fc0
* /?07731fc0 -- 302 --> /
Afterwards it even gives you a 403 (forbidden) if the browser does not follow suite:
Original URL: http://www.zen-slim.com/
Resulting URL: http://www.zen-slim.com/
Status code (after all redirects): 403
Number of responses: 1
Number of redirects: 0
This is less a programming but more a webmaster related question I guess.
I checked your site with Website Auditor. It says that all your pages are 200, but for http://www.zen-slim.com/questionnaire, which is 302.