.htaccess 重定向无法正常工作
我正在使用 .htaccess 将所有文档从旧站点获取到新站点。旧站点不支持 PHP 或 mod_rewrite。我尝试了以下代码:
Redirect 301 / http://www.new.com/archive/
我请求“ http://www.new.com/archive/index.html 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
这可以解决吗?
I'm using a .htaccess to get all documents from an old site to the new one. The old site doesn't support PHP or mod_rewrite. I tried the following code:
Redirect 301 / http://www.new.com/archive/
I requested " http://www.new.com/archive/index.html"
Which resulted into
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
Is this possible to solve?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
.htaccess 可能无法解决。相反,我使用了 javascript。这对SEO来说不太好,但似乎也没有其他办法。
Can probable not be solved with .htaccess. Instead I used javascript. It's not good for SEO, but there seems to be no other way.