dtgr6303 2018-07-31 06:47
浏览 19

登录后URL重写问题

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&params=$1&params1=$ [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&params=$1 [NC,L,QSA]
RewriteRule ^([0-9a-zA-Z]+)(?:/([0-9a-zA-Z]+))(?:/([0-9]*))?/?$ index.php?page=acasa&params=$1&params1=$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: enter image description here

After I press the logout button, the logout function it's not working anymore

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向