更新时间:2022-10-15 08:40:26
您可以尝试使用的 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.