I would like to redirect a subdomain - subdomain1.example.com to subdomain2.example.com What is the best way to do that? using htaccess? DNS? Any ideas are most welcome!
What kind of Server you are using to host your website? Apache or Microsoft? .htacess is best for Apache server and DNS works with Microsoft server.
If using IIS you could also use ISAPI Rewrite or Helicon APE to do your rewriting rules. If neither of those work and you are using IIS you could point the DNS for the second domain at the same IP as the first and setup additional host header values in the sites configuration.
Add "A" records (subdomain1.example.com, subdomain2.example.com) to DNS with same IP-address. Configure Apache's virtual host something like: <VirtualHost *:80> ServerName subdomain1.example.com ServerAlias subdomain2.example.com ... Code (markup): And make .htaccess in the vhost's doc root: RewriteEngine On RewriteCond %{HTTP_HOST} ^subdomain1.example.com$ RewriteRule (.*) http://subdomain2.example.com/$1 [R=301,L] Code (markup):