Hello everyone, there is such a code in .htaccess that removes the php extension from the address bar, and allows you to write an address like example.com/index in the address bar instead of example.com/index.php Everything works on Ur, only there is one thing, it’s like -It conflicts with the php header function (redirect) when I remove it, the header works as it should, but with its presence, it refuses to redirect, can anyone know how to fix it, or can someone else have code that performs the same task for .htaccess?
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^.*$ $0.php [L,QSA] RewriteCond %{THE_REQUEST} ([^\s]*)\.php(\?[^\s]*)? RewriteRule (.*) %1 [R=301,L] here's the header code
if (password_verify($pass001, $pass000) && password_verify($log001, $log000)) { echo 'Password is valid!'; session_start(); $_SESSION['shaccesforadmpanhard'] = true; header("Location: adminpan.php"); }