使用 .htaccess 将一个 url 重定向到另一个 url [英] Redirect one url to another url using .htaccess
本文介绍了使用 .htaccess 将一个 url 重定向到另一个 url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我试图重定向一个完整的 URL
As i am trying to redirect one complete URL
http://www.domain-name.com/download/?page=download
到这个网址
http://www.domain-name.com/download/show
为此我添加了这个代码
rewriterule http://www.domain.com/download/?page=download(.*)$ http://www.domain.com/download/show$1 [r=301,nc]
但这不起作用,而是显示我请求的 URL 显示禁止".
But this is not working and instead it says the URL I am requesting says "Forbidden".
任何人都可以为此提供任何解决方案.
Can any one please give any solution for this.
推荐答案
Redirect One URL to another URL by Using htaccess file:
Redirect One URL to Another URL by Using htaccess file:
Redirect 301 /en/php/project.html http://www.example.org/newpage.html
这篇关于使用 .htaccess 将一个 url 重定向到另一个 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文