Re: rewriting http --> https not working

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

 



> > # 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

Attachment: ssl.sxw
Description: OpenOffice Writer document


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

  Powered by Linux