L
L
lar0n2021-02-23 12:49:21
htaccess
lar0n, 2021-02-23 12:49:21

How to fix .htaccess and 500 error because of it?

Hello!

I have a 500 error when logging into the site. I found out that the error is due to the .htaccess file

It costs VDS running Linux Ubuntu 20 version + Vesta control panel + PHP 5.6

The file itself:

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ http://%1/$1 [L,R=301] 
RewriteCond %{REQUEST_FILENAME} !-d
#Редиректы на страницы

RewriteRule ^user/id/([0-9]+)$ user.php?id=$1
RewriteRule ^user/([0-9]+)$ user.php?id=$1
RewriteRule ^wheel$ modes/wheel.php [L]
RewriteRule ^wheel.php$ modes/wheel.php [L]


RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php 
ErrorDocument 404 /error404

php_flag display_errors on
php_value error_reporting 0
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteBase /
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php56___lsphp .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question