简体   繁体   English

1and1 htaccess文件不起作用

[英]1and1 htaccess file not working

I've created a website on my localhost and having uploaded it to my 1and1.co.uk account, I'm getting a 500 internal server error. 我在本地主机上创建了一个网站,并将其上传到我的1and1.co.uk帐户,但收到500个内部服务器错误。

php_flag display_errors on
php_value error_reporting 9999

RewriteEngine On
RewriteBase /mvc/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

This is the contents of the htaccess file on localhost and it's causing a 500 internal server error now. 这是localhost上htaccess文件的内容,它现在导致500个内部服务器错误。

Any ideas? 有任何想法吗?

Replace those lines: 替换这些行:

php_flag display_errors on
php_value error_reporting 9999

Setting php_flag and php_value is regulary forbidden in shared hosting environment. 在共享托管环境中,通常禁止设置php_flag和php_value。 Add the following lines to the begin of your index.php instead: 将以下几行添加到index.php的开头:

ini_set('display_errors', 'on');
ini_set('error_reporting', E_ALL);

Btw, I see that you are using an error_reporting level of 9999 . 顺便说一句,我看到您使用的是error_reporting级别9999 This looks weired to me. 这对我来说很奇怪。 Note that error_reporting isn't an integer value that can be incremented to output more errors, it is a bitfield instead. 请注意, error_reporting不是可以增加以输出更多错误的整数值,而是位域。 Refer to the manual . 请参阅手册

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM