LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-06-2007, 08:01 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Automatic Redirects in Apache


Hi there --

I have set up SquirrelMail on our e-mail server and I would like to have users be automatically redirected to a secure or https page when they type in the URL to get to the initial login page. The apache server is version 2.2.2. What file(s) should I modify to make this happen? Thanks.
 
Old 03-08-2007, 07:09 AM   #2
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Rep: Reputation: 15
Quote:
Originally Posted by kaplan71
Hi there --

I have set up SquirrelMail on our e-mail server and I would like to have users be automatically redirected to a secure or https page when they type in the URL to get to the initial login page. The apache server is version 2.2.2. What file(s) should I modify to make this happen? Thanks.
Assuming you are using apache? First enable mod_rewrite (how? depends what distribution you use) and then you can do like this

<VirtualHost *:80>
ServerName some.name.fi
Redirect permanent / https://some.name.fi/
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>


This is basic and simple rewriterule, works fine
 
  


Reply



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
Apache automatic domains 70mas Linux - Server 1 02-01-2007 12:51 AM
I'm looking for automatic reloading apache script martien Red Hat 1 04-09-2006 04:11 AM
Apache redirects?! How rincewind Linux - Software 3 02-23-2005 02:43 PM
Apache: Request exceeded the limit of 10 internal redirects guarriman Linux - General 1 01-26-2005 08:06 AM
Automatic Startup of Apache m2azer Linux - General 6 09-20-2004 07:39 AM

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

All times are GMT -5. The time now is 11:19 AM.

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
Open Source Consulting | Domain Registration