rewriting http --> https not working
Ankush Grover
ankush174 at gmail.com
Wed Jul 27 12:18:25 UTC 2005
> > # Rewrite Rules.
> > RewriteEngine On
> > RewriteCond %{HTTPS} !=on
> > RewriteRule ^/webmail/(.*) https://%{SERVER_NAME}/webmail/$1 [R,L]
> > RewriteRule ^/mailman/(.*) https://%{SERVER_NAME}/mailman/$1 [R,L]
> >
> > #Debug rewrite rules
> > RewriteLog /etc/httpd/logs/rewrite_engine_log
> > RewriteLogLevel 3
> > -------
> > The idea is to take any URL under /webmail or /mailman and redirect it
> > to https, so that, for example,
> >
> > http://www.concretecomputing.com/webmail/
> >
> > gets redirected to the same page, but using https. It doesn't happen.
<VirtualHost 192.168.1.46:80>
ServerName localhost
DocumentRoot /var/www/html
DirectoryIndex index.html index.shtml
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/webmail(.*)$ https://192.168.1.46/webmail$1 [L,R]
RewriteLog "/var/log/httpd/rewrite.log"
RewriteLogLevel 4
</VirtualHost>
Replace ipaddress either with the fqdn or with the ipaddress of your machine.
I am also attaching the ssl.sxw file in which how to generate
certiticates for http.
Regards
Ankush Grover
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssl.sxw
Type: application/vnd.sun.xml.writer
Size: 11304 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050727/22acda70/attachment-0001.sxw>
More information about the fedora-list
mailing list