Page 3 of 3

Re: 403 Page to Login Redirect

Posted: Wed Dec 01, 2010 3:46 pm
by fezzicnex
Webdongle wrote:Have the login as a Module not a menu item
I'm using JomSocial and yes i have it as menu item, but why should that affect anything this redirect thing is calling com_user not com_community?

Re: 403 Page to Login Redirect

Posted: Mon Dec 06, 2010 9:57 pm
by derekgeez
jerryjurden wrote:Wow, this worked, thanks so much!

RANT: It's REDICULOUS that a product this mature does not do this by default! It's utterly absurd that I have to hack the code to make this behave the way it should!!!!!

No kidding.... 2011 and it's STILL the same.

Re: 403 Page to Login Redirect

Posted: Thu Dec 09, 2010 3:10 pm
by randy270
I got this to work for me just fine. Many, many thanks. However, how do I make layout changes to the login page? I don't seem to have any control over the modules that appear on that page, and I changes I make to the classes the default_login.php file, they are not reflected on the generated page.

Thanks for your help.

Re: 403 Page to Login Redirect

Posted: Thu Dec 09, 2010 5:16 pm
by Webdongle
randy270 wrote:..... changes I make to the classes the default_login.php file, they are not reflected on the generated page.
.....
If your Template has a Template override for the Login module then altering the core module output will have no effect.

http://docs.joomla.org/Understanding_Output_Overrides

Re: 403 Page to Login Redirect

Posted: Thu Dec 09, 2010 7:04 pm
by randy270
Thanks for the response.

I'm making changes to an override file. Still no change.

Still, I also need to know how to make modules appear on this page. One menu module appears, but the main menu module does not. I don't know which menu item to assign.

Re: 403 Page to Login Redirect

Posted: Sat Dec 11, 2010 3:45 pm
by Webdongle
The Default menu item.

Re: 403 Page to Login Redirect

Posted: Wed Feb 16, 2011 9:03 am
by theperf
All I can say is WOW!!! THAT WAS EASY!!!... I have not seen anyone who had luck in Joomla 1.6 so I though I would report that it works great and took less than 5 minutes to execute changes. Thank you so much! :p

P.S. I am not sure if it was supposed to but it already has a nice note to log in or register for access.

Re: 403 Page to Login Redirect

Posted: Tue Jun 21, 2011 2:14 pm
by poiuytrez
Hi theperf,

Did you try again with Joomla 1.6.3 ? I cannot get it work.

Thank you.

Re: 403 Page to Login Redirect

Posted: Tue Dec 13, 2011 4:35 pm
by thambi
thanks drsassafras

the best solution i have ever had in this subject

thanks once again

Re: 403 Page to Login Redirect

Posted: Tue Jan 24, 2012 10:04 am
by grandiaboy
Is het possible that the file 'drsassafras' included, isn't accesseble anymore? The manual changes are ging me some other problems. After an change, I get a 500-error... :(

Re: 403 Page to Login Redirect

Posted: Thu Mar 15, 2012 5:11 pm
by mr_jacek
Hi. Do you have any idea about solution fot Joomla 2.5? Best Regards

Re: 403 Page to Login Redirect

Posted: Mon May 28, 2012 11:36 am
by Jen1234
The Joomla! 2.5 /components/com_user/views/login/tmpl/default_login.php file does not contain the following row anymore:

Code: Select all

<input type="hidden" name="return" value="<?php echo $this->return; ?>" />
Instead it contains the following:

Code: Select all

<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" />
So, how can I change my code to redirect the 403 pages to the user login?
Thank you in advance.

Re: 403 Page to Login Redirect

Posted: Mon Jun 04, 2012 11:26 pm
by damnpradeep
Looking for the same thing for Joomla 2.5 ? why cant developers make this by default.

Re: 403 Page to Login Redirect

Posted: Mon Jun 11, 2012 11:33 pm
by kozb
Use jacarlinredirect - it is free plugin to redirect system messages

Re: 403 Page to Login Redirect

Posted: Sat Sep 15, 2012 1:50 am
by Mauro F
thanks drsassafras, thanks damnpradeep

If someone want to redirect all 403 errors to login with code. Following the update of the code for joomla 2.5
Put in /yourtemplate/error.php

$ReferTo = $_SERVER['REQUEST_URI'];
$ReferTo = base64_encode($ReferTo);

if ($this->error->getCode() == '403') {
header('Location: ' . $this->baseurl . '/index.php?option=com_users&view=login&return='. $ReferTo); die();
}

Re: 403 Page to Login Redirect

Posted: Sat Mar 23, 2013 1:26 am
by Codeless
If someone want to redirect all 403 errors to login with code. Following the update of the code for joomla 2.5
Put in /yourtemplate/error.php

Code: Select all

$ReferTo = $_SERVER['REQUEST_URI'];
$ReferTo = base64_encode($ReferTo);

if ($this->error->getCode() == '403') {
header('Location: ' . $this->baseurl . '/index.php?option=com_users&view=login&return='. $ReferTo); die();
}
This worked perfectly! Thank you!

Re: 403 Page to Login Redirect

Posted: Wed Oct 02, 2013 10:07 am
by hitman47
If you have joomla 2.5?

Re: 403 Page to Login Redirect

Posted: Sat Apr 30, 2016 7:56 am
by fufanux
Fix for joomla 3 with this?