Author Topic: .htaccess RedirectMatch for ^/$ causing inability to log in  (Read 9147 times)

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
.htaccess RedirectMatch for ^/$ causing inability to log in
« on: March 21, 2007, 06:18:05 PM »
I need for my mail.[website].com URL to have a redirect for the / (^/$ -- top-level directory index.*** file) due to one that I need on my http://www.[website].com page for the / there (due to a script I run).

However, in my mail.[website].com .htaccess, having the ^/$ redirect to mail.[website].com/index.php does not allow me to get past the login page (if I try to login, it does nothing but bring me back as if I just refreshed the page). Having it as mail.[website].com/ does not bring up the login page at all.

I have two other php-run apps on my site, boards.[website].com and photos.[website].com, which both work and login just fine with the / redirect. What do I need to change either in my .htaccess or RoundCube to get RoundCube to work with the / redirect?

Thanks!

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #1 on: March 23, 2007, 09:52:13 AM »
Anybody?? I really would like to access my e-mail from RoundCube again!

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #2 on: March 26, 2007, 01:53:55 AM »
Nobody knows how to fix this??  :'(

Offline seansan

  • Jr. Member
  • **
  • Posts: 84
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #3 on: March 26, 2007, 04:24:53 PM »

In htaccess @ the mail.domain.com root

Code: [Select]

redirect / [url]http://www.domain.nl/mail[/url]

??

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #4 on: March 26, 2007, 06:17:02 PM »
No, that doesn't work. It sits and thinks for a while (prob'ly an endless loop) and then gives an error.

I'm thinking there is something in the RoundCube program that needs to be changed, as other index.php pages for other programs (board and photo album) in other subdirectories I have work and login and go to other pages just fine.

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #5 on: March 28, 2007, 02:14:06 PM »
Could somebody at least direct me to somebody who could help me fix this?? I want to access my e-mails regularly! (Right now, I have to go into my cPanel to access all my accounts via Horde, which I can't stand.)

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #6 on: April 05, 2007, 12:12:40 PM »
I'm gonna run some tests on this. I think I know the issue, but want to double check first. Let me get the latest RC to test with. I'll post back in a bit. It will be a new post, so you'll get an email update.
 
  

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #7 on: April 05, 2007, 01:42:46 PM »
I can't seem to figure it out. I'm not sure exactly what you want to accomplish. WHy not just use a rewrite rule:

Code: [Select]
RewriteEngine On
RewriteRule /.* [url]http://www.domain.com/mail/index.php[/url] [R]

Any page tried to be accessed under document root will then be redirected to index.php. Is that what you want? I'm not sure exactly what you want. Can you explain it?
 
  

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #8 on: April 07, 2007, 02:18:30 AM »
No, not every page. But if I don't have the RedirectMatch in the .htaccess for the subdirectories, you can't access them because the redirect from the main directory (www) comes into play, so trying to go to http ://mail.[website].com/ would just bring you back to http ://www.[website].com/index.html.

The RedirectMatches for my boards and photos subdirectories work just fine with going to other pages and logging in and such. They use Simple Machines for the board and Coppermine for the photos.

The RoundCube for the mail one, though, won't continue past the login screen - the little indicator box at the top doesn't even show up.

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #9 on: April 07, 2007, 07:33:44 AM »
Well, it could be because of inheritance. The top level directory is used on all sub-directories if it's enabled.

Have you tried asking this over on an Apache forum? They'd be able to help you out a bit more.
 
  

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #10 on: April 07, 2007, 04:01:57 PM »
It's a problem with RoundCube, so I don't know how an Apache forum could help.

Offline r@burlco.org

  • Newbie
  • *
  • Posts: 9
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #11 on: April 07, 2007, 10:26:17 PM »
Quote from: Cutsie
It's a problem with RoundCube, so I don't know how an Apache forum could help.

 ::)

Tried renaming index.php to something that's not in your DirectoryIndex directive? E.g. roundcube.php?

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #12 on: April 08, 2007, 01:34:58 AM »
Hey, no need to be rude.

It doesn't work with the file listed in the .htaccess renamed, as RoundCube still goes right back to whatever the http ://mail.[website].com/ page is, whether it is roundcube.php or index.php as the top-level page.

It also doesn't work with RoundCube's index.php file renamed, as that, too, just goes back to index.php.

I'm guessing RoundCube must be written to go to whatever the top-level page in its top folder (the one where index.php is located) is instead of specifically index.php. Other things, like the board and photo album I use, must be written to be specific to index.php, causing them to work with the RedirectMatch.

My short-term solution is to move RoundCube into a folder (i.e. http ://mail.[website].com/mail/) of its own and have the top-level page of the top-level folder of the subdomain (http ://mail.[website].com/) redirect to /mail/index.php. Not exactly the prettiest solution, and defeats one of the purposes of having it in a subdomain (but still is needed there to not get false hits and to make access to it quicker), but at least I won't be stuck using horrible Horde anymore!! :P

Hopefully somebody will want to make RoundCube better by making it specific to its index.php or I'll have to be really bored someday to do it myself and mess the whole thing up. ;D


 ??? Is there supposed to be a message box (or whatever you have named the working status box on the top of the screen) when you log in? I thought I remembered there being one, but there isn't one showing up with my newly-moved RoundCube. All the other ones - loading, sending, logged out - appear, though. Everything else seems to work fine in the new folder, although I haven't tried everything yet (just writing, sending, getting, reading, and fully deleting a message plus viewed the address page and preferences page).

Offline r@burlco.org

  • Newbie
  • *
  • Posts: 9
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #13 on: April 08, 2007, 11:33:31 AM »
Quote from: Cutsie
Hey, no need to be rude.

I agree completely. Summarily dismissing Brett's suggestion was a bit impolite.

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: .htaccess RedirectMatch for ^/$ causing inability to log in
« Reply #14 on: April 09, 2007, 07:46:49 PM »
Quote from: r@burlco.org
I agree completely. Summarily dismissing Brett's suggestion was a bit impolite.

So if he had told me to jump off a bridge to fix my car, I should do that?  ::)

If I needed help with Apache, I would've asked for help on an Apache forum. My question was about RoundCube and why it doesn't work like other things do.

There's nothing rude about not taking advice that has nothing to do with the problem.