我在wordpress中有一个分类搜索表单,链接输出是
http://localhost/wp/?cityid=16
但是我想把它重新改写为
http://localhost/wp/cityid/16
的.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress
我找到了this,但无法实施。有什么帮助吗?
答案 0 :(得分:0)
试试这个RewriteRule
:
RewriteBase /wp/
RewirteRule ^wp/cityid/([0-9]+)$ ?cityid=$1 [L]