LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-03-2008, 09:45 AM   #1
Sovan
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
How to redirect http to https?


Hi all!
I've a server with Fedora Core 8 and squirrelmail.
It's working good,but i want to redirect my address from
http://www.mysite.com/webmail to https://mail.mysite.com
and http://mail.mysite.com to https://mail.mysite.com.

Thank for any appreciates.

HSV
 
Old 12-03-2008, 01:11 PM   #2
sfjoe
Member
 
Registered: Jun 2007
Location: San Francisco
Distribution: Centos 4, Debian
Posts: 55

Rep: Reputation: 16
I believe this redirect will work for you to only redirect from http to https (but keeping the rest of the url unchanged:

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

You'll need another rewrite for the www -> mail instance.

There are other options at http://www.askapache.com/htaccess/ap...-examples.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect http to https awreneau Linux - Server 17 10-14-2008 09:13 AM
weird https redirect EmOuBi Linux - Desktop 0 07-17-2008 01:09 AM
redirect http request to https with "post method" FMH Linux - General 0 10-01-2007 02:16 AM
redirect SquirrelMail from http to https using Apache2 cccc Linux - Server 3 09-23-2006 10:02 AM
Apache & Squirrelmail:Redirect to https? mac_phil Linux - Software 1 05-24-2004 03:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration