This works for us. We don't use virtual hosts but if we put a general
rewrite rule it always re-wrote the https one as well and caused a loop.
In redhat we put this in /etc/httpd/conf.d/redirect.conf. You could
also append this to the end of your httpd.conf file (wherever it is)
virtualhost
If you are looking for particular url, this should work:
RewriteEngine on
RewriteRule ^(.*/somepath/securefile.*) https://%{SERVER_NAME}$1 [R,L]
This does not work on my server. I put this in the htaccess-file of the
DocumentRoot of the virtual server and it had no effect.
Pedro
On the port 80 virtual host, I have:
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) https://I_USE_A_HARDCODED_HOSTNAME/$1 [L,R]
Put this in the htaccess file. Did not work.
Pedro
-
The official User-To-User support
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
On 9/20/06, Huesser Peter [EMAIL PROTECTED] 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
Huesser Peter wrote:
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
On Wed, 2006-09-20 at 17:03 -0400, Ricardo Stella wrote:
Huesser Peter wrote:
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