Re: redirect http to https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Oct 2004, Mike Burger wrote:

> On Thu, 28 Oct 2004, Götz Reinicke wrote:
> 
> > Hi,
> > 
> > is there a simple way, to redirect all http requests to a special 
> > webserver to https? At the moment users have to type https://..., but 
> > I'd like to "disable" normal http:// requests and users, who still try 
> > http should be redirected to the smae page by https...
> 
> There are three ways to do this...a Refresh metatage in your index.html 
> file, the Redirect command, or Rewrite rules;
> 
> The refresh tag, I'll leave you to google.
> 
> For a redirect, in the VirtualHost section for your basic site, you could 
> put in this line:
> 
> Redirect / https://my.site.domain
> 
> The drawback to both is that if the viewer puts in anything other than 
> just "http://my.site.domain";, such as "http://my.site.domain/test";, it 
> won't be redirected.
> 
> The following rewrite rule (which I'm using on my home system, as well as 
> for a number of sites at work), also placed into the VirtualHost section 
> for the site in question, will redirect everything:
> 
> RewriteEngine On
> RewriteRule ^(/.*)          http://my.site.domain$1 [L,R]

Blarg...forgot to change that to "https://my.site.domain$1 [L,R]

Sorry.
-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit 
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a 
message to:

site-update-request@xxxxxxxxxxxxxxxxx

with a message of: 

subscribe


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux