所有.php文件都是403 Forbidden + No 404 Doc Found

时间:2016-02-17 13:49:37

标签: php linux .htaccess server http-status-code-403

我们的网站已经有一段时间了,我现在正在处理一个简单的PHP邮件程序的联系表单。但由于某种原因,目录中的所有.php文件都是403 Forbidden。例如:

http://www.bawkdesign.co.uk/mailer.php

即使尝试不存在的.php文件也会产生403。

http://www.bawkdesign.co.uk/idonoexist.php

也许.htaccess中有什么东西导致了这个?如果有,我看不到它!该网站由GoDaddy托管(是的,不是我的选择) 我已经检查了文件和文件夹权限,它们看起来都很好。任何帮助都非常感谢。

.htaccess文件

#Rewrite urls to remove extensions
Options FollowSymLinks
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC]
RewriteRule ^(.+[^/])/$ http://%{HTTP_HOST}/$1/ [R=301,L]

RewriteCond %{HTTP_HOST} ^bawkdesign.com [NC]
RewriteRule ^(.*)$ http://www.bawkdesign.com/$1 [L,R=301]

#404 Page Not Found
ErrorDocument 404 /404

#Enable server side compression
AddOutputFilterByType DEFLATE text/text text/html text/php text/plain text/xml text/css application/x-javascript application/javascript

#Enable Mod_Expires for browser caching
ExpiresActive On
ExpiresDefault A0

# Set timing for cached files to expire after
<FilesMatch "\.(jpg|jpeg|png|gif|txt|xml|php|js|css|html)$">
ExpiresDefault A704800
Header append Cache-Control "public"
</FilesMatch>

#Define the charset
AddDefaultCharset utf-8

0 个答案:

没有答案