Roundcube Community Forum

Release Support => Pending Issues => Topic started by: Cutsie on March 21, 2007, 06:18:05 PM

Title: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie 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 //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!
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie on March 23, 2007, 09:52:13 AM
Anybody?? I really would like to access my e-mail from RoundCube again!
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie on March 26, 2007, 01:53:55 AM
Nobody knows how to fix this??  :'(
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: seansan on March 26, 2007, 04:24:53 PM

In htaccess @ the mail.domain.com root


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

??
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie 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.)
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: bpat1434 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: bpat1434 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:

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?
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: bpat1434 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: [email protected] 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?
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie 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).
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: [email protected] 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie on April 09, 2007, 07:46:49 PM
Quote from: [email protected] 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.
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: bpat1434 on June 10, 2007, 09:44:08 AM
I was just wondering if maybe it was an apache problem or to see if you had gotten help with RewriteMatch. We're not an Apache help forum, that's why I was asking. But if you feel it's a roundcube problem fine.

There is no "loading" div for the login. Reason is is that the login is not AJAX whereas the sending, loading, and all that stuff really is. So what you're seeing is the proper default behavior.

If I have time today, I'll look into it and see if I can't submit a patch to fix this issue (if it hasn't already been fixed).
Title: Re: .htaccess RedirectMatch for ^/$ causing inability to log in
Post by: Cutsie on June 10, 2007, 09:34:36 PM
I didn't fix it, but found a workaround solution that is working. (See an earlier reply for that.)