Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如果重写引擎打开,则出错-表示FollowSymLinks已关闭_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Apache 如果重写引擎打开,则出错-表示FollowSymLinks已关闭

Apache 如果重写引擎打开,则出错-表示FollowSymLinks已关闭,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我到处都找过了(包括这里),但是找不到这个的正确答案 我已经接管了一个新设置的web服务器的控制权,所有的设置可能还不是很理想,但我无法在.htaccess文件中使用RewriteEngine。错误日志显示无法执行此操作,因为FollowSymLinks已关闭 除了我看不到它在哪 这是带有Apache 5.4.30的CentOS 6.5版(最终版) web文件存储在/home/domain name/public_html和 httpd.conf具有(除其他外) 看起来这一切都归结于/etc/h

我到处都找过了(包括这里),但是找不到这个的正确答案

我已经接管了一个新设置的web服务器的控制权,所有的设置可能还不是很理想,但我无法在.htaccess文件中使用RewriteEngine。错误日志显示无法执行此操作,因为FollowSymLinks已关闭

除了我看不到它在哪

这是带有Apache 5.4.30的CentOS 6.5版(最终版)

web文件存储在/home/domain name/public_html和 httpd.conf具有(除其他外)


看起来这一切都归结于/etc/httpd/conf.d/welcome.conf中的一条声明,其中说

<LocationMatch "^/+$">
    Options Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

似乎又让事情恢复了正常。但是,我不太清楚为什么。

您的htaccess文件是什么样子的?您的.htaccess文件的位置是什么?我在上面的问题中添加了一个典型的htaccess文件(在这个评论中似乎无法格式化)。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
<LocationMatch "^/+$">
    Options Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>
Options -Indexes