Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8066227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:55:04+00:00 2026-06-05T11:55:04+00:00

UPDATE: I tested in a subdomain – no .htaccess and PHP. I created a

  • 0

UPDATE:

I tested in a subdomain – no .htaccess and PHP.
I created a index.html and tried accessing /?p=http:/ and /?p=http://.
I got this error for /?p=http://

Forbidden

You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at test.example.com Port 80

This rules out any PHP or mod_rewrite problem. What is wrong with Apache?

Case 1 (does not work):
mysite.com?p=http://

Case 2 (works):
mysite.com?p=http:/

If there is a http:// or https:// or ftp:// in the query string, there would be an error, even if I encoded it.
I have an index.php (entry script) and a test.php (for testing this error). If I visit a URL (that goes via index.php) with http:// inside the query string, the $_GET variable would be empty even if there are other parameters. If I visit test.php?p=http://, I would get redirected (no change in URL) to index.php with an error (the framework handles invalid requests). Upon replacing http:// with something else, everything works fine – test.php shows what it’s meant to, all other requests goes to index.php with $_GET populated.

I only noticed this error after moving to a new host (hostdime to hostgator). I could not reproduce this anywhere else (old host, local server).

Thank you.

My .htaccess file, stripped of some irrelevant code.

# Use PHP 5.3
AddType application/x-httpd-php53 .php

# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On

    # removes www.
    # ------------------------------------------------------------------
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]

    # rewrite "domain.com/foo -> domain.com/foo/"
    # ------------------------------------------------------------------
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
    RewriteRule ^(.*)$ /$1/ [R=301,L]

    # Yii specific rewrite
    # ------------------------------------------------------------------
    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # otherwise forward it to index.php
    RewriteRule . index.php 
</IfModule>


# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist 
# ------------------------------------------------------------------
Options -MultiViews 



# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss .atom


# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------

<IfModule mod_deflate.c>
...
</IfModule>


<IfModule mod_expires.c>
...
</IfModule>


<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>


# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
    RewriteCond %{SCRIPT_FILENAME} -d
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]
</IfModule>

# Increase cookie security
<IfModule php5_module>
    php_value session.cookie_httponly true
</IfModule>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:55:06+00:00Added an answer on June 5, 2026 at 11:55 am

    So apperently this is a problem on the host. I contacted HostGator for help and they said it was a mod_security problem.
    If you have trouble trying to explain, tell them to run apachetail command on the link you gave.

    These links might help you a little

    http://forums.hostgator.com/mod-security-and-403-errors-t71394.html

    http://www.codingforums.com/showthread.php?t=233958

    http://www.codingforums.com/showthread.php?t=244525

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a folder named rewrite I have two files, .htaccess and index.php <rewrite> -
I've a created a secondary index by using update column ... from cassandra-cli ,
Update: I just tested my JSON format returned from the server using JSONlint and
Update: This does work, I was being stupid :( i have the following extension
********Update to Question********** If the tableview does not affect the model: Are the index
Update: this leak has been solved. If you are getting similar leaks and your
EDIT: LAST UPDATE : So, we've tested some more. I used the facebook developers
I get a HTML parse error (recovered gracefully) warning on my console whenever I
UPDATE I am still debugging this issue and still have not found a solution.
::UPDATE:: LINKS DO NOT EXIST ANYMORE! Very strange indeed, this is definitely a bug!

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.