Reputation: 2984
I tried it with different frameworks from custom build to PhalconPHP.
It seems sometimes, on some servers when there is a specific parameter value, server is adding extra parameters to the query string.
This happens with index
word specifically.
For example if the URL is like this; http://example.com/index
and when I dump $_GET
values I get this;
array(1) {
["_url"]=>
string(29) "/redirect:/public/index.html/"
}
However any other URL value which doesn't start with index
acts as expected. For example when I dump $_GET
for http://example.com/my-page
I get;
array(1) {
["_url"]=>
string(29) "/my-page"
}
My .htaccess
AddDefaultCharset UTF-8
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
# CloudFlare SSL
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [L]
# Redirect WWW to NON-WWW
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# Public Root
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
I googled and checked SOF for solutions but I wasn't so lucky. Any help would be appreciated.
Upvotes: 0
Views: 72
Reputation: 96250
This is usually the “fault” of MultiViews.
Try and disable it by adding
Options -MultiViews
to your .htaccess.
For more info on this topic, check
http://httpd.apache.org/docs/2.2/en/mod/core.html#options
http://httpd.apache.org/docs/2.2/en/content-negotiation.html#multiviews
Upvotes: 1