我如何重定向
website.com/path/?p=4927304
website.com/path/?p=4927304
到
website.com/path/4927304
website.com/path/4927304
,其中的数量是动态的。
where the number is dynamic.
感谢
这条规则将重定向像 /路/ P = 4927304
网址 /路径/ 4927304
:
This rule will redirect URLs like /path/?p=4927304
to /path/4927304
:
RewriteCond %{QUERY_STRING} ^p=([0-9]+)$
RewriteRule ^path/$ /path/%1 [R]