New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
I'd try using:
If it didn't work, then as you look using Apache then maybe you have to create a virtual server for each domain just like if you are hosting them "shared" on your server with a dedicated website for each domain, but then redirect them as above using an .htaccess file in the /Home directory of each domain/virtual server.
From Stackoverflow:
I want to do exact the opposite redirect all domains except my main one to google
Setup the domains as ServerAlias within the VirtualHost and use the rule...
RewriteCond %{HTTP_HOST} !primarydomain\.com [NC]
RewriteRule ^(.*)$ http://www.google.com [R,L]
You can edit that as required; whether or not you want to pass the path/variables/etc. Add multiple RewriteCond lines if you have multiple domains within that VirtualHost which you don't want redirected.
Sounds good but it does not work it redirects all domains
This is the setup i have for reference:
BADDomain.com A Record my SERVER IP > redirect google htaccess
BADDomain2.com A Record my SERVER IP > redirect google htaccess
Gooddomain A Record my SERVER IP > don't redirect
So if someone is coming from baddomain should be redirected if he comes from gooddomain nothing should happen
do you need to redirect to google.com or is it just an example. Do you really need to redirect at all?