403 Page to Login Redirect

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
User avatar
fezzicnex
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Thu Dec 18, 2008 1:57 pm

Re: 403 Page to Login Redirect

Postby fezzicnex » Wed Dec 01, 2010 3:46 pm

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?

derekgeez
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Tue May 13, 2008 4:19 pm

Re: 403 Page to Login Redirect

Postby derekgeez » Mon Dec 06, 2010 9:57 pm

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.

randy270
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu May 22, 2008 1:40 pm
Location: Philadelphia, PA
Contact:

Re: 403 Page to Login Redirect

Postby randy270 » Thu Dec 09, 2010 3:10 pm

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.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33161
Joined: Sat Apr 05, 2008 9:58 pm

Re: 403 Page to Login Redirect

Postby Webdongle » Thu Dec 09, 2010 5:16 pm

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

randy270
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu May 22, 2008 1:40 pm
Location: Philadelphia, PA
Contact:

Re: 403 Page to Login Redirect

Postby randy270 » Thu Dec 09, 2010 7:04 pm

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.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 33161
Joined: Sat Apr 05, 2008 9:58 pm

Re: 403 Page to Login Redirect

Postby Webdongle » Sat Dec 11, 2010 3:45 pm

The Default menu item.

theperf
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Feb 16, 2011 8:01 am

Re: 403 Page to Login Redirect

Postby theperf » Wed Feb 16, 2011 9:03 am

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.

poiuytrez
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Jun 19, 2011 1:00 am

Re: 403 Page to Login Redirect

Postby poiuytrez » Tue Jun 21, 2011 2:14 pm

Hi theperf,

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

Thank you.

thambi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 10, 2006 4:03 am

Re: 403 Page to Login Redirect

Postby thambi » Tue Dec 13, 2011 4:35 pm

thanks drsassafras

the best solution i have ever had in this subject

thanks once again

grandiaboy
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jan 24, 2012 9:56 am
Contact:

Re: 403 Page to Login Redirect

Postby grandiaboy » Tue Jan 24, 2012 10:04 am

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... :(

mr_jacek
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Mar 15, 2012 3:28 pm

Re: 403 Page to Login Redirect

Postby mr_jacek » Thu Mar 15, 2012 5:11 pm

Hi. Do you have any idea about solution fot Joomla 2.5? Best Regards

Jen1234
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Aug 26, 2011 11:07 am

Re: 403 Page to Login Redirect

Postby Jen1234 » Mon May 28, 2012 11:36 am

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.

damnpradeep
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sat Oct 24, 2009 7:06 pm

Re: 403 Page to Login Redirect

Postby damnpradeep » Mon Jun 04, 2012 11:26 pm

Looking for the same thing for Joomla 2.5 ? why cant developers make this by default.

kozb
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat May 19, 2012 6:11 pm

Re: 403 Page to Login Redirect

Postby kozb » Mon Jun 11, 2012 11:33 pm

Use jacarlinredirect - it is free plugin to redirect system messages

Mauro F
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 15, 2012 1:42 am

Re: 403 Page to Login Redirect

Postby Mauro F » Sat Sep 15, 2012 1:50 am

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();
}

Codeless
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Tue Oct 06, 2009 4:36 am

Re: 403 Page to Login Redirect

Postby Codeless » Sat Mar 23, 2013 1:26 am

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!

hitman47
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Sun May 12, 2013 12:26 pm

Re: 403 Page to Login Redirect

Postby hitman47 » Wed Oct 02, 2013 10:07 am

If you have joomla 2.5?

fufanux
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Jun 09, 2010 8:00 am

Re: 403 Page to Login Redirect

Postby fufanux » Sat Apr 30, 2016 7:56 am

Fix for joomla 3 with this?


Return to “Templates for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 10 guests