Forum Moderators: phranque
I have three domains in the same server and IP Address, the server is running SSL so itīs using 443 and 80 ports...the problem is that I need redirect two domains from https to http...as follow:
[domain1.com...]
[domain2.com...]
[domain3.com...]
I need to do this:
[domain1.com...] TO [main.com...]
[domain2.com...] TO [main.com...]
My configuration file httpd.conf looks like:
<IfModule mod_rewrite.c>
RedirectMatch ^/(index.html?)$ [domain3.com...]
RedirectMatch ^/some$ [domain3.com...]
RewriteLog logs/ssl_rewrite_log.some
RewriteLogLevel 80
RewriteEngine On
RewriteOptions inherit
RewriteRule ^//*some//*(.*)$ [domain3.com...]
? [NE,P,L]
</IfModule>
I will appreciate any help
Regards...
Something along these lines should work:
RewriteEngine On
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} domain1\.com [NC,OR]
RewriteCond %{HTTP_HOST} domain2\.com [NC]
RewriteRule ^/some http://www.main.com [R,L]
Here are some references that might be helpful:
mod_rewrite [httpd.apache.org]
Regular expressions [etext.lib.virginia.edu]