I have .htaccess file + a index file with the defined url links. But now i want to except 1 php file from this rule, that i can open it with .php cause it is needed for my GET. the link is than mydomain.com/admin/user.php?id=1 but with the ending removal it is no longer working. How can i get it working ?
My .htaccess file looks like that:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?action=$1 [QSA,L]
and my index.php looks like that:
session_start();
if ($_SERVER['REQUEST_URI'] == '/') {
include './dashboard.php';
} elseif ($_SERVER['REQUEST_URI'] == '/Login') {
include './login.php';
} elseif ($_SERVER['REQUEST_URI'] == '/Admin/User') {
include './admin/user.php';
} else {
include './sites/404.php';
}
Thanks for your help guys.