A
A
Alexander2019-05-11 19:14:53
PHP
Alexander, 2019-05-11 19:14:53

Why is 500 returned when redirecting requests to index.php?

written in .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php

If I remove it, then index.php opens quietly, but a 500 error is issued with it. What is the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
ThunderCat, 2019-05-11
@ThunderCat

Logs!!!! LOOK AT THE LOGS!!!
The first thing to do at 500 is to look at what causes the error. For the virgins of the environment, it is generally mandatory to prescribe

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

in the index as the first lines.

D
dollar, 2019-05-11
@dollar

mod_rewrite not installed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question