我得在htaccess文件这些行:htaccess的:对于同一个页面不同的URL不起作用
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [NC]
RewriteRule ^(.*)/(.*)$ index.php?page=$1&article=$2 [NC]
当谈到解决这样/news/test
,页面变量会像index.php
。 任何想法如何解决?
你希望所有的URL像'http:// www.example.com/news/test'或解析为'index.php?page = news&article = test' –
解析为'index.php?page = news&article =测试' – Kaveh
我的解决方案是否适合您? –