更好.htaccess提示



我希望链接'website.com/abc'重定向到'websitecom/profile.php?user_username=abc&current_user=xyz'。我可以使用.htaccess吗?如果是,如何?

我尝试过使用各种教程,但我能找到的只是将"website.com/abc"重定向到"websitecom/profile.php?user_username=abc'。但是url中的添加字符串'&current_user=xyz'困扰着我。

有什么帮助吗?

进一步的信息,current_user:会话中的用户(当前登录的用户)user_username:当前用户访问过其配置文件的用户

不可以。Apache无法访问用户的cookie。您可能希望创建一个使用header()函数为您进行重定向的网站.com/abc/index.php。

最新更新