Forum Moderators: phranque
But i am tryn to forward requests of 443 to another site..
[xyz.com...] to [example.com...]
RewriteEngine on
RewriteCond {SERVER_PORT} ^443$
RewriteRule ^(.*)$ [example.com...] [R=301,L]
and tried with this too
RewriteEngine on
RewriteCond %{HTTPS}!=on
RewriteRule ^(.*)$ [example.com...] [L,R]
and logs are empty too.
RewriteLogLevel 3
RewriteLog /tmp/blah.txt
It works fine if it is configured at virtual host 80 like below
<VirtualHost *:80>
RewriteCond %{HTTP_HOST} ^www.xyz.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
</VirtualHost>
i am using ibm httpd 2.0.47 server....
Any suggestion also welcome
[edited by: jdMorgan at 3:55 pm (utc) on Oct. 17, 2007]
[edit reason] example.com [/edit]
<VirtualHost *:80>
RewriteCond %{HTTP_HOST} ^www\.xyz\.com[b](:[0-9]+)?[/b]$ [NC]
RewriteRule [b]^/[/b](.*)$ http://www.example.com/$1 [R=301,L]
</VirtualHost>
Also, I recommend the version that detects port 443, rather than detecting "%{HTTPS} = on", because "%{HTTPS}" is not a native Apache variable.
Jim
[edited by: jdMorgan at 12:58 pm (utc) on Oct. 18, 2007]