Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are couple layers in which this could not be working, since there is the handling of the original request, and the also the second request that is followed after you issue a redirect header. </p> <p>You can put debug statements in your PHP to check the URL before the 'if' statement', inside the 'if' statement, and after it. You will soon determine if your requests for 'php' scripts are getting into this script, and how far. </p> <p>Second, what do the logs show for the <em>second</em> request, to browse.php? Are the requests arriving their correctly formed? </p> <p>Finally, the response codes you pasted don't tell the full story, because they don't show the redirection trail. Use a tool like 'HEAD', which comes in Perl's LWP distribution. (Packaged for many OSes). Then you'll see both the original request, and the redirection request, and the separate response code for each. Here's an example showing how google.com redirects to www.google.com:</p> <pre><code>$ HEAD -sSe 'http://google.com' HEAD http://google.com 301 Moved Permanently Cache-Control: public, max-age=2592000 Connection: close Date: Thu, 21 Jun 2012 20:34:38 GMT Location: http://www.google.com/ Server: gws Content-Length: 219 Content-Type: text/html; charset=UTF-8 Expires: Sat, 21 Jul 2012 20:34:38 GMT Client-Date: Thu, 21 Jun 2012 20:34:29 GMT Client-Peer: 74.125.225.104:80 Client-Response-Num: 1 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block HEAD http://www.google.com/ 200 OK Cache-Control: private, max-age=0 Connection: close Date: Thu, 21 Jun 2012 20:34:38 GMT Server: gws Content-Type: text/html; charset=ISO-8859-1 Expires: -1 Client-Date: Thu, 21 Jun 2012 20:34:29 GMT Client-Peer: 74.125.225.208:80 Client-Response-Num: 1 P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&amp;answer=151657 for more info." Set-Cookie: PREF=ID=3d125e353127a33a:FF=0:TM=1340310878:LM=1340310878:S=D64LXQ4HKALmBZ_c; expires=Sat, 21-Jun-2014 20:34:38 GMT; path=/; domain=.google.com Set-Cookie: NID=61=jEiVUOmNI_XWhc78fdGMXmZVfOK-j-7S1njjY9xedBR8CIZAy0pKgAtsiIzO4MLnvFKCJ_gUm4Zx-7TKl3gmHPrEzaWbSAB52LPgZlXoFdzJb7RW_wx-UGjQRCLag0Lt; expires=Fri, 21-Dec-2012 20:34:38 GMT; path=/; domain=.google.com; HttpOnly X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block </code></pre> <p>Alternative, you can use the Developer Tools built into Chromium/Google-Chrome. Open it up, select the Network tab, and then load google.com. You'll see a '301' request followed by a '200' requeset. You can click on the names on the left to see the full request/response headers of each. </p> <p>Finally, consider rewriting your title in the form of a question to match the Q&amp;A format of this site. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload