我在wordpress中有一个页面,我正在使用名为Bad-Debt-Recovery-in/
的slu using。我使用的是自定义的PHP查询页面上的URL的字符串这样如何将PHP字符串变成Wordpress中的slu 012
Bad-Debt-Recovery-in/?zipcode=55555&location=Chambers%20County+AL
我怎样才能使这个网址到这样
Bad-Debt-Recovery-in/55555/Chambers-County/AL/
为重写鼻涕虫?任何帮助,将不胜感激!
更新: 此代码实际上是我使用的。我也简化了它,创建了第三个名为“state”的变量。一个重写是城市,一个是县页:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^Bad-Debt-Recovery-And-Collection-Agencies-Services-In\/([^\/]+)\/([^\/]+)\/([^\/]+)\/? Bad-Debt-Recovery-And-Collection-Agencies-Services-In/?zipcode=$1&city=$2&state=$3 [QSA,L,NC]
RewriteRule ^Bad-Debt-Recovery-And-Collection-Agency-Services-In\/([^\/]+)\/([^\/]+)\/([^\/]+)\/? Bad-Debt-Recovery-And-Collection-Agency-Services-In/?countyid=$1&county=$2&state=$3 [QSA,L,NC]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>
# END WordPress
添加代码,请 – Firefog
我加入基于“Scriptonomy”的解释我的代码。它仍然没有工作。我可能做错了什么。 –