.htaccess无法将重定向子文件夹用于apache root

时间:2016-07-04 09:53:32

标签: php apache .htaccess redirect mod-rewrite

我在Debian 8上,我在http://my-domain.unice.fr/social有一个网站,我想在http://my-domain.unice./上重定向

在我的.htaccess中我有:

RewriteEngine On
RewriteRule ^social/(.*)$ /$1 [R=301,NC,L]

在我的apache2.conf中:

</Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

但是当我访问我的域名时,我的根目录中的文件/文件夹列表...而不是我的网站。

我在配置中忘记了什么?

谢谢你

1 个答案:

答案 0 :(得分:2)

我发现拼写错误:

错误:AllowOvveride All

正确:AllowOverride All