i have bought more extensions for the same domain : domain.com domain.net domain.org i bought them to have them point to the same content . .com is the main one bought some time ago which is the best sollution for doing this ? 301 redirects from the other domains to .com domain ? or DNS redirects to the .com IP ?
thank you , do you happen to have a model on how mod_rewrite should look for such a redirect ? thanks
Hi, I've found a pretty good guide about it check it here Mod Rewrite should be enabled on your server! Saad
I succeeded to make what i had in mind . here is an example for who wants in future: requirements: mod_rewrite (apache module), dns access, access to .htaccess <VirtualHost *:80> ServerName domain.org ServerAdmin webmaster@domain.org IndexOptions FancyIndexing DocumentRoot /var/www/somedir ServerAlias *.domain.org <Directory "/var/www/somedir"> Options Indexes FollowSymLinks RewriteEngine On [COLOR="SeaGreen"]#subdomain.domain.org to subdomain.domain.com[/COLOR] RewriteCond %{HTTP_HOST} ^(.+).[B]domain\.org[/B]$ [NC] RewriteRule ^/?(.*)$ http://[B]%1.domain.com[/B]/ [R=301,L] [COLOR="SeaGreen"]# domain.org to www.domain.com[/COLOR] RewriteCond %{HTTP_HOST} ^[B]domain\.org[/B]$ [NC] RewriteRule ^/?(.*)$ http://[B]www.domain.com[/B]/ [R=301,L] [COLOR="SeaGreen"]#www.domain.org to www.domain.com[/COLOR] RewriteCond %{HTTP_HOST} ^[B]www\.domain\.org[/B]$ [NC] RewriteRule ^/?(.*)$ http://[B]www.domain.com[/B]/ [R=301,L] </Directory> </VirtualHost> Code (markup): Note: you must have in domain.org DNS zone a line like this: *.domain.org. IN CNAME domain.org.