由网友(别哭别梦别恋别醉别爱他)分享简介:我有一个网站,我需要重定向的URL在。I have a site where I need to redirect from one url to another.当前的URL: www.somesite.com/people/johndoe/?id=10 所需的URL: www.somesite.com/pe...
我有一个网站,我需要重定向的URL在。
I have a site where I need to redirect from one url to another.
当前的URL: www.somesite.com/people/johndoe/?id=10
所需的URL: www.somesite.com/people/?id=10
我想这在我的.htaccess文件,但无济于事:
I am trying this in my .htaccess file but to no avail:
RedirectMatch ^ /人/(.*)$ /人/?ID = $ 1
这将返回:
www.somesite.com/people/?id=johndoe
我已经看过了这个网站和其他地方的许多类似的问题,但无法找到一个解决方案,工程。在此先感谢
I have looked up many similar questions on this site and elsewhere, but cannot find a solution that works. Thanks in advance
推荐答案
您正则表达式是不正确的。
Your regex is not correct.
使用这样的:
RedirectMatch ^/(people)/.+$ /$1
相关推荐
最新文章