我得在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
我的解決方案是否適合您? –