Page 2 of 3

Re: 403 Page to Login Redirect

Posted: Fri Nov 27, 2009 5:36 pm
by a2purn
Yes right....
can you help me...

Re: 403 Page to Login Redirect

Posted: Fri Nov 27, 2009 7:01 pm
by Webdongle
Is the SSL certificate installed properly ?

Have you set Joomla to 'Force SSL ?
If 'No', then have you set the individual menu items ?

Re: 403 Page to Login Redirect

Posted: Fri Nov 27, 2009 7:20 pm
by a2purn
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

Re: 403 Page to Login Redirect

Posted: Fri Nov 27, 2009 7:37 pm
by Webdongle
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

Re: 403 Page to Login Redirect

Posted: Wed Dec 09, 2009 8:52 pm
by ProtoPC
Anyone have this working for JomSocial?

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 6:24 pm
by DRM4GOD
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!

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 6:32 pm
by lafrance
@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

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 6:50 pm
by DRM4GOD
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?

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 7:02 pm
by lafrance
@DRM4GOD

No if you replace file via ftp program only upload file not on it give you option replace or resume

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 7:11 pm
by DRM4GOD
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?

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 7:20 pm
by lafrance
Hello!

I never said to upload installation folder just upload the files you have deleted :)

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 7:32 pm
by DRM4GOD
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.

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 7:40 pm
by lafrance
DRM4GOD if you pm me your ftp login information I can see if there any files missing also admin account

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 7:51 pm
by DRM4GOD
Sent the PM lafrance, thanks!

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 8:18 pm
by lafrance
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

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 10:49 pm
by lafrance
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

Re: 403 Page to Login Redirect

Posted: Thu Jan 14, 2010 10:53 pm
by mandville

Re: 403 Page to Login Redirect

Posted: Sat Feb 20, 2010 7:11 am
by drsassafras
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

Re: 403 Page to Login Redirect

Posted: Fri Apr 02, 2010 11:27 am
by Problemsolver
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?

Re: 403 Page to Login Redirect

Posted: Thu Jul 15, 2010 1:37 pm
by vividearth
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

Re: 403 Page to Login Redirect

Posted: Sat Jul 24, 2010 9:20 am
by Trishpp
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.

Re: 403 Page to Login Redirect

Posted: Wed Aug 11, 2010 4:34 pm
by ThePiston

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?

Re: 403 Page to Login Redirect

Posted: Wed Aug 11, 2010 4:46 pm
by jazzking2001
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

Re: 403 Page to Login Redirect

Posted: Thu Aug 19, 2010 10:00 am
by libaizhuo
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

Re: 403 Page to Login Redirect

Posted: Thu Sep 16, 2010 11:52 am
by vdrover
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.

Re: 403 Page to Login Redirect

Posted: Wed Oct 06, 2010 12:36 am
by JoomGeeks
Perfect fix!

Re: 403 Page to Login Redirect

Posted: Thu Nov 25, 2010 3:21 am
by masoesa
<?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?

Re: 403 Page to Login Redirect

Posted: Tue Nov 30, 2010 5:31 pm
by msaizar
Your post is very helpful. I made the change and it works great.
Thanks for your sharing.

Re: 403 Page to Login Redirect

Posted: Wed Dec 01, 2010 3:26 pm
by fezzicnex
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

Re: 403 Page to Login Redirect

Posted: Wed Dec 01, 2010 3:34 pm
by Webdongle
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