0

我正在尝试使用创建临时 URL 的重定向

Redirect Permanent /dir/subdir http://www.domain.com/other_dir/htmlfile.html

请注意,“dir”存在于文件结构中,但“subdir”不存在。

在浏览器中,如果我输入http://www.domain.com/dir/subdir重定向工作(即使再次,“subdir”不存在)但http://www.domain.com/dir/subdir /返回 404。

基本上我想创建一个重定向到文件的假目录

4

1 回答 1

0

这不是目录与文件的关系。你可以有任何 URL 指向你想要的任何东西,Redirect Permament 在这个意义上非常严格,所以如果你希望 /dir/subdir/ 也能正常工作,你应该声明另一个别名: Redirect Permanent /dir/subdir/ http:/ /www.domain.com/other_dir/htmlfile.html

于 2010-10-28T11:24:50.240 回答