选项索引FollowSymLinks包括给出perchtest / index.php禁止403

时间:2017-02-23 17:30:11

标签: php .htaccess perch

在我的网站中我使用html,但想要合并一个名为perch的.php cms。当我尝试运行兼容性测试时,我得到了一个Forbidden 403.当我停用.htacess时,它有效。经过一段时间的测试后,我把它缩小到了这个

Options Indexes FollowSymLinks Includes

当我发表评论时,它有效,但对于htaccess如何完全无效而无知,我不知道这是什么停用。我该怎么做才能让它仍然激活并让我的网站允许访问.php文件。完整的我的htaccess代码(没有页面特定的重定向)在下面。

RewriteOptions inherit

RewriteEngine on
AddType text/html .shtml
AddHandler server-parsed .shtml
# Options Indexes FollowSymLinks Includes <-----
AddHandler server-parsed .html .htm

<IfModule mod_expires.c>
  ExpiresActive on

# Your document html
  ExpiresByType text/html "access plus 0 seconds"

# Media: images, video, audio
  ExpiresByType audio/ogg "access plus 2 weeks"
  ExpiresByType image/gif "access plus 2 weeks"
  ExpiresByType image/jpeg "access plus 2 weeks"
  ExpiresByType image/png "access plus 2 weeks"
  ExpiresByType video/mp4 "access plus 2 weeks"
  ExpiresByType video/ogg "access plus 2 weeks"
  ExpiresByType video/webm "access plus 2 weeks"

# CSS and JavaScript
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType text/css "access plus 0 seconds"
</IfModule>

# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/js

AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

0 个答案:

没有答案