.htaccess上的符号链接

时间:2011-09-12 10:30:24

标签: apache .htaccess symlink

我想为我的域配置.htaccess文件以启用符号链接并进行以下操作:

public_html/a/folder1/folder2/folder3/指向public_html/b/folder1/folder2/

请给我这些

的完整代码

1 个答案:

答案 0 :(得分:-1)

这将重写您的网址:

RewriteRule ^b/folder1/folder2/$   a/folder1/folder2/folder3/

如果您转到:example.com/b/folder1/folder2/它会显示example.coma/folder1/folder2/folder3/

修改

RewriteCond %{HTT_HOST}  ^domain\.com$
RewriteRule ^/folder2/folder3/$  http://domain.net/folder1/folder2/