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

Thanks. This solution works. I have to make the Redirects in the
<VirtualHost> block.

Pedro


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to