我有3个文件.htaccess
::
RewriteEngine On
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cats.php?name=$1
index.php
:
<?php
echo 'index';
并且cats.php
:
<?php
echo $_GET['name'] . ' < '.$_GET["name"];
我面临的问题是,当我在 site.com 上时,它会将我重定向到cats.php
always。但是在我的本地主机上,它仅在传递参数时才会重定向我,例如:
site.com/some-argument