I succesfully managed to add to my url an parameter but I can't redirect to the other pages. For example, if I click on logout it's not working even if I have a redirect rule added.
RewriteRule ^en/(.*)$ index.php?page=$1&lang=en [NC,L]
RewriteRule ^ro/(.*)$ index.php?page=$1&lang=ro [NC,L]
RewriteRule acasa$ index.php?page=acasa&lang=ro¶ms=$1¶ms1=$ [NC,L,QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([0-9a-zA-Z]+)$ index.php?page=acasa [NC,L,QSA]
RewriteRule ^([0-9a-zA-Z]+)(?:/([0-9a-zA-Z]+))?/?$ index.php?page=acasa¶ms=$1 [NC,L,QSA]
RewriteRule ^([0-9a-zA-Z]+)(?:/([0-9a-zA-Z]+))(?:/([0-9]*))?/?$ index.php?page=acasa¶ms=$1¶ms1=$2 [NC,L,QSA]
RewriteRule logout$ index.php?page=logout [NC,L]
And here it's the PHP code:
<?php
// Includere clasa login
include_once("class/class_login.php");
// Reseteaza login (delogare)
$login = new Login($db);
$login->_logout();
// remove 'remember me' cookie
if(isset($_COOKIE[$cookie_name]))
{
setcookie ($cookie_name, '', time() - $cookie_time);
}
unset($_SESSION[PRE.'cookie']);
header("Location: " . $BASE, TRUE, 301);
exit();
?>
This is how the page it's looking like. If I click on logout it's not redirecting me to the logout page anymore... Here are some screenshots: