Apache简单重定向从一个页面到另一个页面(Apache simple redirect from one page to a second one)
我需要从一个网址重定向到另一个网址
我见过的所有例子都使用reg表达式和我需要重定向的复杂语法
www.mydomain.com/page1.html
至
www.mydomain.com/page1replacement.html
我想它在.htaccess文件中,但是语法是什么?
Update1试过这个,但它无法正常工作:我需要重启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谢谢
I need to redirect from one url to another full url
all examples I have seen use reg expressions and complicated syntax I need to redirect from
www.mydomain.com/page1.html
to
www.mydomain.com/page1replacement.html
I suppose its in the .htaccess file, but what would be the syntax?
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=100thanks
最满意答案
这将进入.htaccess文件。 可以使用完整的URL。
Redirect 301 /page1.html http://mydomain.com/page1replacement.htmlThis goes into your .htaccess file. Full URLs can be used.
Redirect 301 /page1.html http://mydomain.com/page1replacement.html更多推荐
发布评论