Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 01-14-2009, 12:19 PM
golddave golddave is offline
Hatchling Croc
 
Join Date: Jan 2005
Posts: 32
Default PHP Redirect Gets 403 Forbidden

I have a PHP file that counts clicks on specific links (via a mySQL database) then redirecting the browser to the destination URL. The file is called as follows:
http://www.mysite.com/redirect.php?h...www.google.com

in this example redirect.php is my redirect file and http://www.google.com is the URL I'm redirecting to. When this is executed I get a 403 Forbidden error. Anyone have any ideas how I can get past the error?

Thanks,
Dave
Reply With Quote
  #2  
Old 01-14-2009, 12:59 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,558
Default Re: PHP Redirect Gets 403 Forbidden

Quote:
Originally Posted by golddave View Post
I have a PHP file that counts clicks on specific links (via a mySQL database) then redirecting the browser to the destination URL. The file is called as follows:
http://www.mysite.com/redirect.php?h...www.google.com

in this example redirect.php is my redirect file and http://www.google.com is the URL I'm redirecting to. When this is executed I get a 403 Forbidden error. Anyone have any ideas how I can get past the error?

Thanks,
Dave
It's ModSecurity causing that error, contact HG support and they can add an exception rule for it.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #3  
Old 01-14-2009, 10:49 PM
mp3 mp3 is offline
Junior Croc
 
Join Date: Dec 2007
Posts: 167
Default Re: PHP Redirect Gets 403 Forbidden

You might want to look into open redirects (you don't want them).
Reply With Quote
  #4  
Old 01-15-2009, 09:14 AM
golddave golddave is offline
Hatchling Croc
 
Join Date: Jan 2005
Posts: 32
Default Re: PHP Redirect Gets 403 Forbidden

Turned out to be mod_security. Thanks for the suggestion, quietFinn.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
403 Forbidden errors monacelli Shared Hosting Support 5 11-26-2008 12:30 PM
403 forbidden and additional 404 mr_bill Shared Hosting Support 7 11-13-2008 02:29 AM
Please help~ My site got 403 Forbidden error kam Shared Hosting Support 14 01-18-2008 04:22 PM
Forbidden Error on Images? uberamd Shared Hosting Support 4 12-18-2007 12:18 AM
China Forbidden? webvideo Shared Hosting Support 20 08-13-2007 05:07 PM

All times are GMT -5. The time now is 10:14 PM.