Hello

 

This question was often asked before but I did not get any solution to work:

 

I want to rewrite all request to “http:virtual.server.domain/path/file.html” to “https://virtual.server.domain/path/file.html”. One of the solutions I found is:

 

            RewriteEngine On

            RewriteCond %{HTTPS} off

            Rewrite ^/path/file.html https://%{HTTP_HOST}/path/file.html

 

I but this in the htaccess file of the DocumentRoot of the virtual server and also in the main httpd.conf file of the webserver. Both did not work. So I tried the following:

 

            RewriteEngine On

            RewriteCond %{HTTPS} off

            Rewrite (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

which should rewrite all the URLs of the specific virtual host. It did not work either. Many people found this a good solution for the problem therefore I guess I am still missing something. Any idea ?

 

Thanks’ in advance for any help

 

            Pedro

 

Reply via email to