View Single Post
  #1  
Old 19th March 2010, 10:40
neutrino neutrino is offline
Member
 
Join Date: Oct 2008
Posts: 60
Thanks: 13
Thanked 7 Times in 7 Posts
Lightbulb http to https redirection

Hello,

I'm currently trying to redirect the url http://mail.server.com to https://mail.server.com

I've tried all the options in ISPCONFIG (no flag, R, L, RL) and none off them actually work, Firefox / IE / Opera, there is no browser that accepts the rewrite rule.

The code produced by ispconfig is the next one :

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mail.server.com [NC]
RewriteRule ^/(.*)$ https://mail.server.com/$1 [R,L]


What I want to do, is to replace the ISPconfig code with something that works like :

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]


Problem is, each time I'll perform a change on the site, my code will be erased by the standard ispconfig code.

How can I change this ? I suppose I have to change some master code of ISPconfig, but I don't really like that idea, because it always causes trouble when updating to a new version.

Can a fix be expected in a future version of ISPconfig maybe ?
Reply With Quote
Sponsored Links