Reputation: 305
I am building a website using joomla. In this site when a user request any page of my site, he should be redirected to disclaimer page. In disclaimer page a form is present. After submiting email, captcha when user press submit, he should be redirected to previously requested page.
Then the disclaimer page shouldn't appear when user browsing other pages of site.
How to remember the requested url user entered, so that on pressing submit, he is redirected there?
Upvotes: 0
Views: 160
Reputation: 2938
have you tried this?
<?php
$url = htmlspecialchars($_SERVER['HTTP_REFERER']);
$this->setRedirect($url);
?>
Upvotes: 1
Reputation: 7059
Try JURI::current()
it will give you the current url.Add this as a parameter to url when you redirect to disclaimer page and than use this there.
Upvotes: 2