开发者

php rewrite url

开发者 https://www.devze.com 2023-01-09 05:15 出处:网络
Is it possible to have it so when a page is requested with a get parameter from anlink, say www.mtsite.com?param=val

Is it possible to have it so when a page is requested with a get parameter from an link, say

www.mtsite.com?param=val

That the parameter stuff is hidden, without using post and JS?

Tha开发者_StackOverflow中文版nks


You could immediately set a cookie with the parameter after doing a redirect using:

 header('Location: http://www.mtsite.com');

I just read that the order has to be location redirect and then cookie set, so you'll want to make sure to do it in that order.

Then, when you catch the redirected page, get the cookie with that parameter and act appropriately (probably clearing the cookie in the process).

0

精彩评论

暂无评论...
验证码 换一张
取 消