通过重写和屏蔽将文件夹重定向到root

时间:2015-09-08 08:50:50

标签: .htaccess

我想将目录domain.com/presta/index.php重定向并屏蔽为domain.com/index.php,可能吗?

我有这个:

RewriteEngine on
RewriteBase /
RewriteRule ^(?!presta/)(.*)$ /presta/$1

但是我将domain.com/重定向到domain.com/presta

1 个答案:

答案 0 :(得分:0)

尝试:

RewriteEngine On
RewriteRule ^presta/(.*)$ /$1 [NC,R,L]
相关问题