Forums / Developer / Redirection

Redirection

Author Message

Trevor Clowry

Monday 11 April 2005 8:43:32 am

When a page is accessed on my site and the user doesnt have the correct privileges to access it, the login page appears. If the user logs in , the user is redirected to the welcome page by a line in the login script
<input type="hidden" name="RedirectURI" value="/welcome" />.
However I was wondering if there is a way to redirect them to the page that they originally tried visited and not to the welcome page.

Thanks in advance,
Trev

Ɓukasz Serwatka

Tuesday 12 April 2005 12:38:12 am

Hi Trevor,

You can use:

<input type="hidden" name="RedirectURI" value="{$User:redirect_uri}" />

After login user will be redirect to page that tried to visit.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Trevor Clowry

Tuesday 12 April 2005 1:46:52 am

Thanks, that worked perfectly.