Roundcube Community Forum

 

.htaccess RedirectMatch for ^/$ causing inability to log in

Started by Cutsie, March 21, 2007, 06:18:05 PM

Previous topic - Next topic

Cutsie

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!

Cutsie

Anybody?? I really would like to access my e-mail from RoundCube again!

Cutsie


seansan


In htaccess @ the mail.domain.com root


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

??

Cutsie

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.

Cutsie

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.)

bpat1434

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.
 
 

bpat1434

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?
 
 

Cutsie

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.

bpat1434

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.
 
 

Cutsie

It's a problem with RoundCube, so I don't know how an Apache forum could help.

[email protected]

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?

Cutsie

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).

[email protected]

Quote from: Cutsie Hey, no need to be rude.

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

Cutsie

Quote from: [email][email protected][/email] 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.