301重定向htaccess的重定向、htaccess

由网友(痴狂)分享简介:即时通讯和我的htaccess的问题我有以下重定向301 /inspection-test.html http://www.newsit.co.uk/inspection-test.aspx我目前的网站上运行PHP和新的运行在.NET 重定向的作品,但它的表现为HTTP://www.newsit.co.ukinspec...

即时通讯和我的htaccess的问题

我有以下

 重定向301 /inspection-test.html http://www.newsit.co.uk/inspection-test.aspx
 

我目前的网站上运行PHP和新的运行在.NET

重定向的作品,但它的表现为

  HTTP://www.newsit.co.ukinspection-test.html
 

解决方案 .htaccess文件的常见用法 301 404等配置

您可以尝试使用的 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.

阅读全文

相关推荐

最新文章