小编sen*_*iwa的帖子

重定向异常

我认为这很容易,但恐怕我无法自己解决所有问题。

我已将网站移至另一个域,并设置了一些永久重定向。但是,我想从任何重写中保留一个 URL。现在我的配置是这样的:

Redirect permanent /olduser/exception/ ???
Redirect permanent /olduser/dir/ http://newuser.domain.com/a.html
Redirect permanent /olduser/other/ http://newuser.domain.com/q.html
Redirect permanent /olduser/other/sub/ http://newuser.domain.com/t/some.html
Redirect permanent /olduser/ http://newuser.domain.com/
Run Code Online (Sandbox Code Playgroud)

当然,第一行是有问题的,因为我在最后一行将整个子目录重定向到新域。在新域上我没有权限,因为它是一个类似于 GitHub 的静态网站。

请注意,我不能简单地使用重写规则,因为旧目录不对应于新文件/目录。或者更好,我看不出我怎么能做到这一点:)

如何/olduser/exception/在不影响其他规则的情况下在旧服务器上工作?

谢谢!

mod-rewrite redirect apache-2.2

3
推荐指数
1
解决办法
6006
查看次数

标签 统计

apache-2.2 ×1

mod-rewrite ×1

redirect ×1