如何使用.htaccess将一个URL重定向到另一个URL?
我被困在将一个URL重定向到另一个URL上。
我想重定向
https://samedomain.com/page-check-927GSJAYS639AL/highlights
到
https://samedomain.com/page-highlights/
(927GSJAYS639AL这是ID,它可以是
任何
东西
RewriteEngine On
RewriteBase /
RewriteRule ^page-check-([A-Z0-9]*)/highlights /page-highlights/?id=$1 [L]
)错误页面的
任何帮助将受到高度赞赏。提前致谢。
I am stuck at redirecting one url to another url.
I want to redirect
https://samedomain.com/page-check-927GSJAYS639AL/highlights
to
https://samedomain.com/page-highlights/
(927GSJAYS639AL this is id it can be anything)
the http://samedomain.com/page-highlights/
is the wordpress page
The rewrite rule I tied is:
RewriteEngine On
RewriteBase /
RewriteRule ^page-check-([A-Z0-9]*)/highlights /page-highlights/?id=$1 [L]
but i see 404 error page
Any help is highly appreciated. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论