Note that there are some explanatory texts on larger screens.

plurals
  1. PO"http://" in query string does not work
    primarykey
    data
    text
    <p>UPDATE:</p> <p>I tested in a subdomain - no .htaccess and PHP. I created a <code>index.html</code> and tried accessing <code>/?p=http:/</code> and <code>/?p=http://</code>. I got this error for <code>/?p=http://</code></p> <pre><code>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 </code></pre> <p>This rules out any PHP or mod_rewrite problem. What is wrong with Apache?</p> <p>Case 1 (does not work): mysite.com?p=http://</p> <p>Case 2 (works): mysite.com?p=http:/</p> <p>If there is a <code>http://</code> or <code>https://</code> or <code>ftp://</code> in the query string, there would be an error, even if I encoded it. I have an <code>index.php</code> (entry script) and a <code>test.php</code> (for testing this error). If I visit a URL (that goes via <code>index.php</code>) with <code>http://</code> inside the query string, the <code>$_GET</code> variable would be empty even if there are other parameters. If I visit <code>test.php?p=http://</code>, I would get redirected (no change in URL) to <code>index.php</code> with an error (the framework handles invalid requests). Upon replacing <code>http://</code> with something else, everything works fine - <code>test.php</code> shows what it's meant to, all other requests goes to <code>index.php</code> with <code>$_GET</code> populated.</p> <p>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).</p> <p>Thank you.</p> <p>My .htaccess file, stripped of some irrelevant code.</p> <pre><code># Use PHP 5.3 AddType application/x-httpd-php53 .php # ---------------------------------------------------------------------- # Start rewrite engine # ---------------------------------------------------------------------- &lt;IfModule mod_rewrite.c&gt; 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 -&gt; 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 &lt;/IfModule&gt; # 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 # ---------------------------------------------------------------------- &lt;IfModule mod_deflate.c&gt; ... &lt;/IfModule&gt; &lt;IfModule mod_expires.c&gt; ... &lt;/IfModule&gt; &lt;IfModule mod_autoindex.c&gt; Options -Indexes &lt;/IfModule&gt; # Block access to "hidden" directories whose names begin with a period. This # includes directories used by version control systems such as Subversion or Git. &lt;IfModule mod_rewrite.c&gt; RewriteCond %{SCRIPT_FILENAME} -d RewriteCond %{SCRIPT_FILENAME} -f RewriteRule "(^|/)\." - [F] &lt;/IfModule&gt; # Increase cookie security &lt;IfModule php5_module&gt; php_value session.cookie_httponly true &lt;/IfModule&gt; </code></pre>
    singulars
    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.
 

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