0

我在 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

我发现了这一点,但无法实施我的案例。请问有什么帮助吗?

4

1 回答 1

0

试试这个RewriteRule

RewriteBase /wp/
RewirteRule ^wp/cityid/([0-9]+)$ ?cityid=$1 [L]
于 2012-07-29T13:09:33.150 回答