简体   繁体   中英

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.

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.

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. Add the following lines to the begin of your index.php instead:

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

Btw, I see that you are using an error_reporting level of 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. Refer to the manual .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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