我有一个艰难的情况,我需要用“?”重写一个 url & “id” 到一个 seo 友好的 url。
这是实际的网址
http://www.example.com/services.html?sr=1
http://www.example.com/services.html?sr=2
http://www.example.com/services .html?sr=3
http://www.example.com/services.html?sr=4
我需要把它改成这样。
http://www.example.com/services/car-dealers.html
http://www.example.com/services/restaurent.html
http://www.example.com/services/nonprofit.html
http:// /www.example.com/services/school.html
我的 htacces 代码
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^services/car-dealers.html services.html?sr=1 [L]
RewriteRule ^services/restaurent.html services.html?sr=2 [L]
RewriteRule ^services/nonprofit.html services.html?sr=3 [L]
RewriteRule ^services/school.html services.html?sr=4 [L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
我使用 WordPress 作为 CMS。有什么可能吗?