RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Recycle Bin > Recycle Bin

For more information about the ads and why they're here, please see the FAQ
Closed Thread
  #1  
Old 09-16-2006, 07:31 AM
Registered User
 
Join Date: Sep 2006
Posts: 8
Downloads: 0
Uploads: 0
Default redirection to https

Hi,

JUst want to redirect all traffic in my webmail.domain.com to https and changed the .htaccess but this doesn't work.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

# AddDefaultCharset UTF-8
#php_flag display_errors Off
php_flag log_errors On
php_value error_log logs/errors
#php_value upload_max_filesize 2M

<FilesMatch "(\.inc|\~)$|^_">
Order allow,deny
Deny from all
</FilesMatch>

Order deny,allow
Allow from all

What am I missing. I have no access to http.conf so I need to do it in .htaccess.

thanks!!
__________________
Eddie would go !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 09-17-2006, 05:13 AM
Registered User
 
Join Date: Sep 2006
Posts: 4
Downloads: 0
Uploads: 0
Default Re: redirection to https

I just figured this out myself. I am using this in my httpd.conf but it should work in a .htaccess as well:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

Hope this works!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 09-17-2006, 06:45 PM
Registered User
 
Join Date: Sep 2006
Posts: 8
Downloads: 0
Uploads: 0
Default Re: redirection to https

The rules work, but when used with the other rules in the .htaccess from roundcube it doesn't
__________________
Eddie would go !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 09-17-2006, 10:06 PM
Registered User
 
Join Date: Sep 2006
Posts: 4
Downloads: 0
Uploads: 0
Default Re: redirection to https

Do you have these rules as the last set of rules? the letter L in the brackets [R=301,L] means that this rule is the last rule. So make sure these are the last rules.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 11-06-2006, 08:25 PM
Registered User
 
Join Date: Nov 2006
Posts: 7
Downloads: 0
Uploads: 0
Default Re: redirection to https

and for all those people who are using lighty for example:
add the following lines to index.php

Code:
if( !isset( $_SERVER["HTTPS"] ) ){
 header( "Location: https://" . $_SERVER["HTTP_HOST"] );
 exit();
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 11-06-2006, 08:56 PM
Registered User
 
Join Date: Sep 2006
Posts: 4
Downloads: 0
Uploads: 0
Default Re: redirection to https

and for all those people who aren't using lighty for example:

I am using apache, not lightpd. That code will work with apache and mod_rewrite.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 11-06-2006, 09:24 PM
Registered User
 
Join Date: Nov 2006
Posts: 7
Downloads: 0
Uploads: 0
Default Re: redirection to https

Quote:
Originally Posted by ipstatic
and for all those people who aren't using lighty for example:

I am using apache, not lightpd. That code will work with apache and mod_rewrite.
sry, corrected my post. wanted to say "people who are using lighty"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 11-07-2006, 12:35 AM
Registered User
 
Join Date: Sep 2006
Posts: 4
Downloads: 0
Uploads: 0
Default Re: redirection to https

Thats cool, I didn't know if thats what you ment.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 12:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright © 2006-2008 RoundCube Webmail Community