为什么索引关键字是返回空$_GET seo url与htaccess在apache 2.4.18


why index keyword is return empty $_GET on seo url with htaccess in apache 2.4.18?

我用的是wamp server 3.0.4

我的htaccess代码在这里

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]

但是当我进入这个url = "localhost/myproject/index"

my $_GET array is empty = array()

当我进入这个url = "localhost/myproject/second"

my $_GET array is = [_url] => /second/

这是由于使用MultiViews选项打开。选项MultiViews(参见http://httpd.apache.org/docs/2.4/content-negotiation.html)由Apache's content negotiation module使用,它在 mod_rewrite之前运行,并使Apache服务器匹配文件的扩展名。因此,如果/index是URL,那么Apache将提供匹配的/index.php

使用。htaccess:

Options -MultiViews