Redirecting access in Apache to https://
Josh Glover
colug at jmglov.net
Fri May 28 07:39:35 EDT 2004
Quoth Ken Bradford (Thu 2004-05-27 09:50:35AM -0400):
> > Josh Glover:
> >
> > And here is one more:
> >
> > <VirtualHost *:80>
> > ServerName mail.jmglov.net
> > DocumentRoot /data/httpd/htdocs/squirrelmail
> > <IfModule mod_rewrite.c>
> > RewriteEngine On
> > RewriteOptions inherit
> > RewriteRule ^(.*)$ https://mail.jmglov.net$1 [R,L]
> > </IfModule>
> > </VirtualHost>
>
> Thanks, Josh. BTW, what is the significance of "[R,L]"?
Redirect, Last.
The R (Redirect) flag forces a redirect of the URI if the rule matches.
The L (Last) flag tells mod_rewrite that this is the last rule, don't
bother looking at any others. This is to make sure it does not fall
through if I add any other rules.
Cheers,
Josh
--
Josh Glover
Gentoo Developer (http://dev.gentoo.org/~jmglov/)
Tokyo Linux Users Group Listmaster (http://www.tlug.jp/)
GPG keyID 0xDE8A3103 (C3E4 FA9E 1E07 BBDB 6D8B 07AB 2BF1 67A1 DE8A 3103)
gpg --keyserver pgp.mit.edu --recv-keys DE8A3103
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.colug.net/pipermail/colug/attachments/20040528/8eb77bd1/attachment.bin
More information about the colug
mailing list