On 9/20/06, Huesser Peter <peter.huesser@xxxxxx> wrote:
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:
The simplest solution to this is as follows. If you have both an http and https server, then you should have a <VirtualHost> block for each server. Inside the <VirtualHost> block for the non-ssl server (ie, the one on port 80), put a normal redirect: Redirect /path/file.html https://virtual.server.domain/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:
Don't use htaccess files if you have access to httpd.conf. mod_rewrite directives must also be placed inside the <VirtualHost> section, or you must include RewriteEngine On RewriteOptions inherit inside the <VirtualHost>. If you have further problems with mod_rewrite, be sure to use the RewriteLog to debug. Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx