Apache redirecting: reason unknown

Posted by Sinan on Pro Webmasters See other posts from Pro Webmasters or by Sinan
Published on 2011-06-28T21:59:06Z Indexed on 2011/06/30 0:30 UTC
Read the original article Hit count: 411

Filed under:
|
|

I have a simple php script. The script is not important. It just prints out $_SERVER.

When I request an URL like www.server.com/?ref=bar everything is fine.

However if the request contains something like www.server.com/?ref=http://www.test.com (?ref=http%3A%2F%2Fwww.test.com) the server redirects to 403.shtml.

No redirect for http://x but redirects http://x.y

As far as I can understand somehow the server doesn't like "http://x". It always redirects to 403.shtml when there is a valid query string in the form of a valid url.

my .htacess file is the same both on my server and local test server and local test server behaves as expected (no redirects). So I don't it is related to .htaccess.

I'm on shared host on Hostgator. Can anyone help?

Edit:

Here's the .htaccess file

Options +FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?$1 [L,QSA]

When there is an http://xx.x it redirects to 403 even if there is physical file. However if I remove the .htaccess redirect to 403 also disappears. But I need the above .htaccess file. Is there a way to get around this?

© Pro Webmasters or respective owner

Related posts about php

Related posts about apache