301重定向htaccess的 [英] 301 Redirect htaccess
本文介绍了301重定向htaccess的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
即时通讯和我的htaccess的问题
我有以下
重定向301 /inspection-test.html http://www.newsit.co.uk/inspection-test.aspx
我目前的网站上运行PHP和新的运行在.NET
重定向的作品,但它的表现为
HTTP://www.newsit.co.ukinspection-test.html
解决方案
您可以尝试使用的 RedirectMatch
apache httpd的文档 来代替:
RedirectMatch 301 ^ /检验测试\ html的$ TTP://www.newsit.co.uk/inspection-test.aspx
重定向
apache httpd的文档 将原来的URL部分添加到其产生不可预测的输出你的情况你的服务器上的重定向URL的末尾。
使用 RedirectMatch
则可以更好地控制行为。
im having a problem with my htaccess
I have the following
Redirect 301 /inspection-test.html http://www.newsit.co.uk/inspection-test.aspx
My current site runs on php and the new one runs on .net
The redirect works but its showing as
http://www.newsit.co.ukinspection-test.html
解决方案
You can try to use RedirectMatch
Apache HTTPD Docs instead:
RedirectMatch 301 ^/inspection-test\.html$ ttp://www.newsit.co.uk/inspection-test.aspx
Redirect
Apache HTTPD Docs will add the original URL-part to the end of the redirect URL which produces the unexpected output in your case on your server.
With RedirectMatch
you can better control the behavior.
这篇关于301重定向htaccess的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文