.htaccessredirectdoens't正常工作

我正在使用.htaccess从旧网站的所有文件到新的。 旧网站不支持PHP或mod_rewrite。 我试了下面的代码:

Redirect 301 / http://www.new.com/archive/ 

我请求“ http://www.new.com/archive/index.html ”导致的

 http://www.new.com/archive/old.com/olddir/&&&/&&&/users/4/web/00/00/24/04/44/&&&/1/&&&/0/&&&/&&&/&&&/users/4/web/00/00/24/04/44/&&&/1/&&&/0/&&&/index.html 

这有可能解决吗?

凯文 –

乍看之下,你的应用程序中看起来像是做了很多redirect。 在.htaccess中的简单的Redirect语句不应该创build上面粘贴的很长的URL。

如果您使用curl来testing它,它可能会帮助您debugging问题:

 $ curl -I olddomain.com | grep ^Location Location: http://newdomain.com/archive/olddomain.com/ 

从那里,只是curl返回的url,然后看看你redirect到哪里。 采取下一个URL并curl它。 继续下去,直到你能够debugging这些redirect的来源。