.htaccess 重定向无法正常工作

发布于 2024-09-29 00:47:32 字数 588 浏览 1 评论 0原文

我正在使用 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风渺 2024-10-06 00:47:33

.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文