.htaccess获取第3级文件夹文件内容到第2级文件夹文件

时间:2012-09-12 13:49:15

标签: php .htaccess mod-rewrite

1 个答案:

答案 0 :(得分:0)

试试这段代码:

RewriteRule ^folder1/folder2/folder3/(.*)$ http://{%HTTP_HOST}/folder1/folder2/$1 [L]

此代码重定向
来自:folder1/folder2/folder3/another_foler/or_another_file.php?and=get
致:folder1/folder2/another_foler/or_another_file.php?and=get

相同的链接,但没有folder3