How would I do this URL change?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Try this mod_rewrite rule:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^a=(\d+)&b=(\d+)$
RewriteRule ^index\.php$ %1/%2
This will rewrite a request of /index.php?a=6&b=3
internally to /6/3
.
And if you rather want the other way round:
RewriteEngine on
RewriteRule ^(\d+)/(\d+)$ index.php?a=$1&b=$2
This will rewrite a request of /6/3
internally to /index.php?a=6&b=3
.