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.
a2purn
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Fri Feb 27, 2009 9:27 am
Contact:

Re: 403 Page to Login Redirect

Post by a2purn » Fri Nov 27, 2009 5:36 pm

Yes right....
can you help me...

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

Re: 403 Page to Login Redirect

Post by Webdongle » Fri Nov 27, 2009 7:01 pm

Is the SSL certificate installed properly ?

Have you set Joomla to 'Force SSL ?
If 'No', then have you set the individual menu items ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

a2purn
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Fri Feb 27, 2009 9:27 am
Contact:

Re: 403 Page to Login Redirect

Post by a2purn » Fri Nov 27, 2009 7:20 pm

Webdongle wrote:Is the SSL certificate installed properly ?

Have you set Joomla to 'Force SSL ?
If 'No', then have you set the individual menu items ?
SSL already installed properly and i tried with individual menu but after set to the menu all link to be https...
I want SSL install only on login page and reg pages, other page will redirect to http

Thanks

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

Re: 403 Page to Login Redirect

Post by Webdongle » Fri Nov 27, 2009 7:37 pm

a2purn wrote:
Webdongle wrote:Is the SSL certificate installed properly ?

Have you set Joomla to 'Force SSL ?
If 'No', then have you set the individual menu items ?
SSL already installed properly and i tried with individual menu but after set to the menu all link to be https...
I want SSL install only on login page and reg pages, other page will redirect to http

Thanks
Then set only the Login page to https and not the others.

http://forum.joomla.org/viewtopic.php?p ... 1#p1836391
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
ProtoPC
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 30, 2007 9:33 pm
Contact:

Re: 403 Page to Login Redirect

Post by ProtoPC » Wed Dec 09, 2009 8:52 pm

Anyone have this working for JomSocial?

DRM4GOD
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Jul 04, 2009 1:12 am

Re: 403 Page to Login Redirect

Post by DRM4GOD » Thu Jan 14, 2010 6:24 pm

I broke my installation somehow, after deleting a login extension, because now when I select LOGIN or CREATE NEW ACCOUNT, I get redirected to web search results with a search criteria of either the index.php file or the com_user directory, respectively. How do I fix this? It's urgent!

User avatar
lafrance
Joomla! Ace
Joomla! Ace
Posts: 1116
Joined: Thu Jan 11, 2007 5:02 pm
Location: Alberta,Canada
Contact:

Re: 403 Page to Login Redirect

Post by lafrance » Thu Jan 14, 2010 6:32 pm

@ProtoPC check there web site as it a paid extension we do not respond to query.
@DRM4GOD,did you try to upload the deleted files again ?If you are not running 1.5.15 good time to upgrade any way
VEL contributor @ http://docs.joomla.org/Investigation_of_exploits
OSM,Trademark and Licensing Team,jed editor
Please no pm direct contact irc freenode.net #joomla

DRM4GOD
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Jul 04, 2009 1:12 am

Re: 403 Page to Login Redirect

Post by DRM4GOD » Thu Jan 14, 2010 6:50 pm

lafrance, problem is I thought I only deleted extension, not any critical part of Joomla. I don't remember what I deleted, and there's no way to retrieve them. I tried copying back over the com_user dir from a fresh install of the template, and also com_login, no luck. This has to just be a missing plugin or something from the standard install.

The Joomla install and template are on GoDaddy. If there were a way to just replace what I deleted, I'd be fine. But I'm concerned if I reinstall Joomla, I'll erase all the work I've done.

Also, any Joomla updates would be done by Godaddy, wouldn't they?

User avatar
lafrance
Joomla! Ace
Joomla! Ace
Posts: 1116
Joined: Thu Jan 11, 2007 5:02 pm
Location: Alberta,Canada
Contact:

Re: 403 Page to Login Redirect

Post by lafrance » Thu Jan 14, 2010 7:02 pm

@DRM4GOD

No if you replace file via ftp program only upload file not on it give you option replace or resume
VEL contributor @ http://docs.joomla.org/Investigation_of_exploits
OSM,Trademark and Licensing Team,jed editor
Please no pm direct contact irc freenode.net #joomla

DRM4GOD
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Jul 04, 2009 1:12 am

Re: 403 Page to Login Redirect

Post by DRM4GOD » Thu Jan 14, 2010 7:11 pm

lafrance, I apologize, I'm not understanding the broken English. If I go into GoDaddy and reinstall Joomla, won't it only give me the option to overwrite my current database? Or is there a repair option?

User avatar
lafrance
Joomla! Ace
Joomla! Ace
Posts: 1116
Joined: Thu Jan 11, 2007 5:02 pm
Location: Alberta,Canada
Contact:

Re: 403 Page to Login Redirect

Post by lafrance » Thu Jan 14, 2010 7:20 pm

Hello!

I never said to upload installation folder just upload the files you have deleted :)
VEL contributor @ http://docs.joomla.org/Investigation_of_exploits
OSM,Trademark and Licensing Team,jed editor
Please no pm direct contact irc freenode.net #joomla

DRM4GOD
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Jul 04, 2009 1:12 am

Re: 403 Page to Login Redirect

Post by DRM4GOD » Thu Jan 14, 2010 7:32 pm

lafrance, the problem is I don't know what files I deleted. I thought all I was deleting was a 3rd party extension, but it must have been a core Joomla plugin for logging in and creating new users. I need to repair this, but I don't know what I'm missing. Sorry for the confusion.

User avatar
lafrance
Joomla! Ace
Joomla! Ace
Posts: 1116
Joined: Thu Jan 11, 2007 5:02 pm
Location: Alberta,Canada
Contact:

Re: 403 Page to Login Redirect

Post by lafrance » Thu Jan 14, 2010 7:40 pm

DRM4GOD if you pm me your ftp login information I can see if there any files missing also admin account
VEL contributor @ http://docs.joomla.org/Investigation_of_exploits
OSM,Trademark and Licensing Team,jed editor
Please no pm direct contact irc freenode.net #joomla

DRM4GOD
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Sat Jul 04, 2009 1:12 am

Re: 403 Page to Login Redirect

Post by DRM4GOD » Thu Jan 14, 2010 7:51 pm

Sent the PM lafrance, thanks!

User avatar
lafrance
Joomla! Ace
Joomla! Ace
Posts: 1116
Joined: Thu Jan 11, 2007 5:02 pm
Location: Alberta,Canada
Contact:

Re: 403 Page to Login Redirect

Post by lafrance » Thu Jan 14, 2010 8:18 pm

Hello!
got them please do not pm me until all your extension as been updated and joomla.No point helping you when you have a major exploit extension install poor security maintenance result in crying my site was hack :p
VEL contributor @ http://docs.joomla.org/Investigation_of_exploits
OSM,Trademark and Licensing Team,jed editor
Please no pm direct contact irc freenode.net #joomla

User avatar
lafrance
Joomla! Ace
Joomla! Ace
Posts: 1116
Joined: Thu Jan 11, 2007 5:02 pm
Location: Alberta,Canada
Contact:

Re: 403 Page to Login Redirect

Post by lafrance » Thu Jan 14, 2010 10:49 pm

Hello!

No idea what you did however now you have duplication again of every files also you have new folder that was not on your root of joomla,as you had jumi maybe they hack your user account please read http://docs.joomla.org/Security_Checklist_7
VEL contributor @ http://docs.joomla.org/Investigation_of_exploits
OSM,Trademark and Licensing Team,jed editor
Please no pm direct contact irc freenode.net #joomla

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 14804
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: 403 Page to Login Redirect

Post by mandville » Thu Jan 14, 2010 10:53 pm

HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

drsassafras
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Mar 06, 2009 3:43 pm

Re: 403 Page to Login Redirect

Post by drsassafras » Sat Feb 20, 2010 7:11 am

While, it looks like the end of my hack. Joomla and CB (what ever one it is) has seen the wisdom of my mod.

They no longer use the 403 error page, and you are re-directed to a resource you requested while not logged in.

Since I don't really know what com-mod is achieving this, I am using joomla 1.5.15 and CB 1.2.1 However, without testing it appears to to be consistent in both joom and cb logins.

Thanks too those that continued to tweak my inital hack to work with future versions of Joomla and CB.

Dr. Sassafras

Problemsolver
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Fri Apr 03, 2009 11:20 pm

Re: 403 Page to Login Redirect

Post by Problemsolver » Fri Apr 02, 2010 11:27 am

Hey. I made the changes and now I get redirected to
http://bonusbloggen.com/index.php/casin ... rTo=L2luZG

I am guessing that it send me to
domain/index.php/casino/index.php

instead of

domain/index.php/

But how do I fix that? Shall I change to an absolute link or what should I do to make it work?

vividearth
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Apr 29, 2009 4:09 pm

Re: 403 Page to Login Redirect

Post by vividearth » Thu Jul 15, 2010 1:37 pm

Anyone looking at this - there is no need to hack the core. Just place this code below the defined( '_JEXEC' ) or die( 'Restricted access' ); line in error.php:

<?php
if ($this->error->code = '403') {
$return = $_SERVER['REQUEST_URI'];
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_user&view=login&return=$return");
header('Location:'.$uri); die();
}
?>

Bascially the same but just uses "return" as url param rather than "ReturnTo" since com_user already understands the "return" parameter so no point changing it.

Also use Jroute is case you are using SEF for your login url.

v

Trishpp
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Jul 24, 2010 9:13 am

Re: 403 Page to Login Redirect

Post by Trishpp » Sat Jul 24, 2010 9:20 am

Thank you for this useful bit of help.

I love the Joomla community. As a complete but addicted to Joomla novice I type in a phrase to try and express what I am trying to do and lo and behold a solution is there.

ThePiston
Joomla! Guru
Joomla! Guru
Posts: 640
Joined: Mon Nov 07, 2005 3:45 am
Contact:

Re: 403 Page to Login Redirect

Post by ThePiston » Wed Aug 11, 2010 4:34 pm

Code: Select all

<?php
	if ($this->error->code = '403') {
		$return = $_SERVER['REQUEST_URI'];
		$return = base64_encode($return);
		$uri = JRoute::_("index.php?option=com_user&view=login&return=$return");
		header('Location:'.$uri); die();
	}
?>
this code give me a php error : unexpected ">" on line 16. Also, can you write a SEF version or is that one the SEF version (?) - it already says JRoute

**edit** I removed the php tags and now it works (without the 2nd file edit) but it only takes me to front page. How do I get it to take me to the original page I clicked on?

jazzking2001
Joomla! Explorer
Joomla! Explorer
Posts: 397
Joined: Sun Sep 02, 2007 12:50 am
Contact:

Re: 403 Page to Login Redirect

Post by jazzking2001 » Wed Aug 11, 2010 4:46 pm

ThePiston wrote: How do I get it to take me to the original page I clicked on?
i have the same question
i did the edit as stated above but still it still takes me to the front page
http://www.neocrisis.com/ - What will you find Next?

User avatar
libaizhuo
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 131
Joined: Mon Dec 04, 2006 10:52 am
Contact:

Re: 403 Page to Login Redirect

Post by libaizhuo » Thu Aug 19, 2010 10:00 am

Many thanks for your solution, you're such a genius.. This would save me loads of time, thank you!

I believe it'll be better if we do it using Joomla! 1.5's template overriding feature, therefore you don't need to hack the core. So instead of editing /com_user/views/login/tmpl/default_login.php, we could download it, apply the changes you mentioned, and then upload it again to the directory below:

/templates/YOUR_TEMPLATE_NAME/html/com_user/login/default_login.php

I just tried that and it worked!! :)

L
Please check out our FREE Joomla! templates at http://www.redevolution.com

NEW! Red Evolution Joomla! support forum http://forum.redevolution.com

User avatar
vdrover
Joomla! Guru
Joomla! Guru
Posts: 616
Joined: Fri Mar 03, 2006 3:26 pm
Location: Canuck via MKE
Contact:

Re: 403 Page to Login Redirect

Post by vdrover » Thu Sep 16, 2010 11:52 am

This is an old thread but i found a non-hack, non-override solution for 403 errors on my site. In my case, I only get 403 errors under these circumstances:

1. Content category is restricted to registered users
2. Menu item for this category is public, and is a child item of another menu item (the parent)
3. The parent menu item is restricted to registered users

All i had to do was restrict the child menu item to registered users, and the 403 went away.
Victor Drover
http://anything-digital.com - Joomla Extensions and Custom Development
https://watchful.li - Remote backup, update and security monitoring for Joomla.

User avatar
JoomGeeks
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 190
Joined: Wed Aug 25, 2010 2:43 am
Contact:

Re: 403 Page to Login Redirect

Post by JoomGeeks » Wed Oct 06, 2010 12:36 am

Perfect fix!
Joomla Support & Development ~ http://joomgeeks.com

User avatar
masoesa
Joomla! Explorer
Joomla! Explorer
Posts: 300
Joined: Mon Sep 26, 2005 7:11 pm
Location: Brooklyn NY
Contact:

Re: 403 Page to Login Redirect

Post by masoesa » Thu Nov 25, 2010 3:21 am

<?php
if ($this->error->code == '403') {
header('Location: http://www.mywebsite.com/index.php?opti ... view=login'); die();
} ?>

This worked for me. The problem I have is that I link to a login page. That works fine if users click on read more but not if they click on title link. Any suggestions?
http://going-natural.com
The site where Natural Beauty Shines

msaizar
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Nov 30, 2010 5:27 pm

Re: 403 Page to Login Redirect

Post by msaizar » Tue Nov 30, 2010 5:31 pm

Your post is very helpful. I made the change and it works great.
Thanks for your sharing.

User avatar
fezzicnex
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Thu Dec 18, 2008 1:57 pm

Re: 403 Page to Login Redirect

Post by fezzicnex » Wed Dec 01, 2010 3:26 pm

this seemed to work fine, but upon login it redirects me home (not the the link i entered with)

what should i do? i did what drsassafras said in the original post

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

Re: 403 Page to Login Redirect

Post by Webdongle » Wed Dec 01, 2010 3:34 pm

fezzicnex wrote:this seemed to work fine, but upon login it redirects me home (not the the link i entered with)

what should i do? i did what drsassafras said in the original post
Have the login as a Module not a menu item
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein


Locked

Return to “Templates for Joomla! 1.5”