我有一个.htaccess
文件,如下所示:
RewriteEngine On
RewriteRule ^/?([^/.]+)$ display.php?category=$1 [B,L]
RewriteRule ^gallery/([^/.]+)/?$ gallery.php?category=$1 [L]
RewriteRule ^([-_\+A-Za-z0-9,]+)$ displayitem.php?item=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ displayitem.php?item=$1&start=$2&page=$3 [L,QSA]
显示displayitem.php?item=$1
时出现问题。当我尝试执行此命令时,页面将保留在上一页上,并且找不到displayitem.php
。
这很奇怪。如果我注释掉以下行:
RewriteRule ^/?([^/.]+)$ display.php?category=$1 [B,L]
用于传递utf-8字符,一切正常,所有规则都将被执行,所有参数都将被传递。但是,utf-8字符将无法正确传递并且找不到echo Page。
请帮忙!!感谢。