如何将一个页面网址重定向到另一个 [英] How to Redirect one Page url to another
本文介绍了如何将一个页面网址重定向到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将一个页面重定向到另一页面,如下所示.
I want to redirect one page to another page which is something like below..
http://dev .****.in:82/abc/wp重定向到
http://dev.****.in:82/abc/wp redirect to http://dev.****.in:82/abc/blog
我在.htaccess上尝试了以下代码,但是没有运气.
I have tried the below code on .htaccess but no luck.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dev\.xxx\.in\/:\/82\/abc$
RewriteRule ^wp$ "http\:\/\/dev\.xxx\.in\/:\/82\/abc\/blog" [R=301,L]
推荐答案
重定向此网址的最简单方法是RedirectMatch
the easiest way to redirect this url is RedirectMatch
RedirectMatch ^/abc/wp/?$ /abc/blog
这篇关于如何将一个页面网址重定向到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文