0

In my browser(Maxthon) When I give refresh to an URL name:

http://m.example.com/page..

I find that on the server side the HTTP_HOST instead gets:

http://www.example.com/page..

This is very strange. What could be the reason for this? Sometimes this happens with other browsers as well.

From the Network tab of the browser I've grabbed this Request/Response Headers:

Request URL:http://m.governmentjobsindia.org/30-deputy-manager-posts-national-highways-authority-delhi
Request Method:GET
Status Code:200 OK
**Request Header**   sview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer:http://m.governmentjobsindia.org/30-deputy-manager-posts-national-highways-authority-delhi
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.0 Chrome/18.0.966.0 Safari/535.12
**Response Headers**   view source
Cache-Control:public, max-age=900
Content-Encoding:gzip
Content-Language:en
Content-Length:12696
Content-Type:text/html; charset=utf-8
Date:Wed, 18 Mar 2015 10:55:05 GMT
Etag:"1426675521-0"
Expires:Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified:Wed, 18 Mar 2015 10:45:21 +0000
Link:<http://www.governmentjobsindia.org/30-deputy-manager-posts-national-highways-authority-delhi>; rel="canonical",<http://www.governmentjobsindia.org/node/4675>; rel="shortlink"
Server:Apache
Vary:Accept-Encoding
X-Drupal-Cache:HIT
X-Generator:Drupal 7 (http://drupal.org)
X-Powered-By:PHP/5.3.10-1ubuntu3.13
  • 2
    How are you checking the host on the server? – Tim Fountain Mar 18 '15 at 11:58
  • I would be looking at DNS and server-side settings. Something is wrong here. – closetnoc Mar 18 '15 at 16:51
  • @Tim I'm checking using PHP : $_SERVER['HTTP_HOST'] – AgA Mar 18 '15 at 17:04
  • The HTTP_HOST should be getting pulled from the request headers. (Any server variable that starts HTTP_ is populated this way.) You're not showing the complete request headers, specifically the GET and Host: lines. Click on "view source" and paste the complete request header block. – MrWhite Mar 18 '15 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.