Joomla!
http://forum.joomla.org/

Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)
http://forum.joomla.org/viewtopic.php?f=378&t=30653
Page 1 of 1

Author:  RobB [ Mon Jan 16, 2006 12:43 am ]
Post subject:  Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

Since the upgrade to Joomla 1.0.7 I cannot access the admin login on my subdomains.

I assume it has something to do with the SEF and .htaccess, since I am getting a Joomla 404 error page.

I renamed htaccess.txt to .htaccess as usual, but now I noticed the following:

Code:
##
## NOTE!
## When using multiple Joomla sites or other web applications in sub-folders,
## you must explicitly turn the RewriteEngine off or use the settings
## recommended for the application
##


I am having one joomla website in root (http://www.domain.com) and four separate joomla installations on subdomains (subdomain.domain.com), whereby the subdomains are actually folders within the public_html directory.

I managed to log in actually via the "very wrong path", e. g. domain.com/subdomain and then to change the link in the browser to the proper one according DNS set up, otherwise the Editor does not work, but this is not my preferred login-option to the admin backend. 

Can anyone help me what to change in the .htaccess file to change or give me the recommendations for multiple Joomla sites according to the htaccess comments?

Thank you in advance

Robert

Author:  blort [ Mon Jan 16, 2006 12:55 am ]
Post subject:  1.0.7 -- SEF, Rewrite, and subdirectories

MODS:  Can you move this under this thread?
http://forum.joomla.org/index.php/topic,30653.0.html

Thanks!

Seems, we both have the same questions
=======================================

Hi,

Some questions about the rewrite rules and SEF...

Conditions
  • Joomla 1.0.7
  • SEF Enabled
  • Create a subdirectory in Joomla install directory
  • Create basic .htaccess file and .htpasswd file for subdirectory
  • Create basic content or enable server directory listings for subdirectory

Problem
  • With Auth declarations in the subdirectory .htaccess file you get rewritten to the new 1.0.7 404 page
  • With Auth declarations commented out of .htaccess file you can go into the subdirectory and look at content

I like to install Joomla in my public_html directory and use subdirectories for other things such as forums, documents, etc.  However, I like to password protect some of these directories.  However, with this current setup, I cannot protect directories within the Joomla root without getting rewritten to the 404 page.

Is this as simple as a new rewrite rule in the parent Joomla directory?

Thanks,

Marcos
=============================
Edit:

It seems to be the "Require valid user" part of the .htaccess file that triggers the problem

Author:  RobB [ Mon Jan 16, 2006 12:03 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

Would it help to add a line into the .htaccess file *not* trying to re-write certein directories?

But how should this line look?

Thanks.

Author:  MoCmS [ Mon Jan 16, 2006 1:27 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

Having same issues here too. My root installation made it through the upgrade, but my subdirectory installs failed, with a lockout of the admin area and the whole site going offline and defaulting to offline announcement screen to contact the administrator of this website. When I threw the sef switch in global admin, it kicked me out to the area. The htaccess has changed so much that I am at complete odds with it.???

Problem solved with this thread, regarding the issue of no login or blocked login at admin section http://forum.joomla.org/index.php?PHPSESSID=e484c04e5a25a8869f63d68325245294&topic=30618.0 however my global editing area has now been thrown into unwritable mode. This happened at root as well, is this the work of htaccess again?

Author:  leolam [ Mon Jan 16, 2006 2:33 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

MoCmS wrote:
Having same issues here too. My root installation made it through the upgrade, but my subdirectory installs failed, with a lockout of the admin area and the whole site going offline and defaulting to offline announcement screen to contact the administrator of this website. When I threw the sef switch in global admin, it kicked me out to the area. The htaccess has changed so much that I am at complete odds with it.???

Problem solved with this thread, regarding the issue of no login or blocked login at admin section http://forum.joomla.org/index.php?PHPSESSID=e484c04e5a25a8869f63d68325245294&topic=30618.0 however my global editing area has now been thrown into unwritable mode. This happened at root as well, is this the work of htaccess again?

noope that is normal...resets to unwritable...before making changes tio your global config you need to set the permissions to 777. as soon as ready back to 644
Leo

Author:  blort [ Mon Jan 16, 2006 2:46 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

This sounds like two separate issues to me.  Regarding the subdirectory protection issue, this is what I can tell.  The parent Joomla .htaccess file rewrites all requests unless they [1] a file ending in one of the extensions in the first line, [2] a file, or [3] a directory.

Code:
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php


Then the request gets passed on to the includes/sef.php routines which don't process authorization requests.  For some reason which I don't understand, the rules above let you into a subdirectory (under the !-d rule I assume), but as soon as you activate the "Require-valid user" part of the subdirectory's .htaccess file you get the Joomla 404 page instead of a password request box.

I've tried as many of the directory matching rules as I can muster for exceptions, but while they work with the "Require-valid user" field commented out in the subdirectory, as soon as an HTTP password is required I end up back at the Joomla 404 page.

I think not being able to HTTP password protect subdirectories is a problem.  I don't know if this is a bug, but it certainly is causing me problems.

Marcos

Author:  RobB [ Mon Jan 16, 2006 3:59 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

I also think, we're mixing here two different problems.

My issue is actually that I would like to know what to add in the .htaccess file in the joomla root installation (public_html/) in order to get the joomla admin login for the subdomains (e. g. subdomain.domain.com which is public_html/subdomain) when typing subdomain.domain.com/administrator

That is the point where I am getting the new Joomla 404 page.

Don't get me wrong: The site itself on subdomain.domain.com works perfectly. It's just the admin-login, which gets the Joomla 404.

Thanks in advance.

Rob

Author:  blort [ Mon Jan 16, 2006 7:20 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

Rob,

Are you password protecting your subdomain admin logins?  Also, what did you use to create your subdomains?  CPanel or something similar?

Marcos

Author:  RobB [ Mon Jan 16, 2006 8:50 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

blort wrote:
Rob,

Are you password protecting your subdomain admin logins?  Also, what did you use to create your subdomains?  CPanel or something similar?

Marcos


No, the directories are not password protected. They were automatically created through cpanel when creating the subdomains.

I must mention, that the problem only comes since 1.0.7 (I updated via FTP) and that the normal viewing of the site is without any problems.

I can access the admin-backend via http://domain.com/subdomain/administrator to get the backend login-screen and then after logging in changing the url in the browser to subdomain.domain.com/administrator/index2.php to get TinyMCE to work. Even though it's quite annoying, I can manage, but it's not a solution for the other people who need to go sometimes in the backend.

Author:  blort [ Mon Jan 16, 2006 9:31 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

If I remember correctly, cPanel puts in a rewrite rule for each subdomain in your public_html .htaccess file.  Perhaps they are stepping on each other since the Joomla rewrite rules seem pretty inclusive so I don't know if there is a conflict there.  But, I do think that to get x.domain.com versus domain.com/x is through a rewrite which is likely getting overruled later by the Joomla rules.  I messed around with directory exclusions with a rewrite condition, but I couldn't get it to work for my http password issues.  It was something like:

RewriteCond %{REQUEST_FILENAME} !/.*administrator.*$

It matched the directory when I had Require valid-user off, but didn't solve my version of this problem.  I agree that the prime suspect is the Joomla .htaccess rules although I haven't found a good work around yet for my issue.  I hope we get some developer feedback, because I think both of these issues are a serious problem, especially for those trying to do a couple things with one domain.

I'll keep plugging on my end.

Author:  focalguy [ Sun Jan 29, 2006 5:40 am ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

You guys have any success with this? I've never been able to get my simple redirect to work with .htaccess.

I just want my http://www.mydomain.com to redirect to http://www.mydomain.com/cms/

The problem is the same as you all have described with the sub domains. It's like the sub domain follows the same rule even though I have an htaccess in that folder without the redirect. If I access it using http://www.domain.com/subdomain it works but that's not the point of subdomains.

I can't see where cPanel sets up the subdomains 'cause it's not in the htaccess in my webroot.

Author:  Tonie [ Sun Jan 29, 2006 9:24 am ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

You might try out this thread. Gram had some really good points in his .htaccess configuration.

Author:  focalguy [ Sun Jan 29, 2006 6:05 pm ]
Post subject:  Re: Joomla 1.0.7 cannot access admin login on subdomain (assume htaccess/SEF)

Thanks Tonie,

lots of good info in that post. I'll give some of those a try.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/