我正在尝试重新编写动态生成的URL。但我写的规则并不影响URL甚至一个位。Rewrite-dynamic URL .htaccess
的URL目前显示像:http://ukfurniturespecialist.co.uk/county.php?c=Oxfordshire&%20t=Faringdon
,我想它看起来像:
这是我曾尝试:
Options +FollowSymLinks
RewriteEngine on
RewriteRule county-c-(.*)-%20t-(.*)\.html$ county.php?c=$1&%20t=$2
任何帮助非常感谢,谢谢。
为什么那里有'%20'?如果你只是:'^县-c - (。*)$'它是否去'county.php'? – Halcyon
我认为'%xx'代码被转换为它们的实际字符,但我不是100%确定的。在这种情况下,您需要匹配'\'。 – Sumurai8
@FritsvanCampen:不,它不是:( – Jinandra