我想指向
http://example.com/folder1/folder2/folder3/index.php
至
http://example.com/folder1/folder2/index.php
有人能帮我吗?
试试这个代码:
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
。