阿帕奇简单的从一个页面重定向到另一个 [英] Apache simple redirect from one page to a second one

查看:198
本文介绍了阿帕奇简单的从一个页面重定向到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从一个URL重定向到另一个完整的URL

I need to redirect from one url to another full url

我见过使用前章pressions和复杂的语法所有的例子
我需要从

all examples I have seen use reg expressions and complicated syntax I need to redirect from

www.mydomain.com/page1.html

www.mydomain.com/page1.html

www.mydomain.com/page1replacement.html

www.mydomain.com/page1replacement.html

我想它在.htaccess文件,但会是什么语法?

I suppose its in the .htaccess file, but what would be the syntax?

UPDATE1
试过,但它不工作:我是否需要重启apache ??

Update1 Tried this but its not working: Do I need to restart apache??

Redirect 301 http://www.theprinterdepo.com/catalogsearch/result/index/?cat=100&q=1022&x=0&y=0 http://www.theprinterdepo.com/catalogsearch/advanced/result/?name=1022&sku=&price%5Bfrom%5D=&price%5Bto%5D=&free_shipping=&category=100 

感谢

推荐答案

这进入.htaccess文件。完整的URL可以使用。

This goes into your .htaccess file. Full URLs can be used.

Redirect 301 /page1.html http://mydomain.com/page1replacement.html

这篇关于阿帕奇简单的从一个页面重定向到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆