mod_rewrite syntax question

Hello,

I have an Ensim box running RH 7.1. I'm trying to redirect all requests for www.domain1.com to sub.domain2.com.

domain1.com is aliased to domain2.com (via ensim), so I have a the .htaccess file in /home/virtual/domain2.com/var/www/html/.

Any ideas?


Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST) ^domain1\.net$
RewriteRule ^/(.*) http://sub.domain.com/$1


Randy

 

 

 

 

Top