RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$0 [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$0 [L]
RewriteEngine On
RewriteRule ^(.*)$ /public/$0
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?$0 [L]
$a = $b == 2 ?: 3;
// было
if ($code != 404) {
$code = 500;
}
http_response_code($code);
// стало
http_response_code($code == 404 ? 404 : 500);