Help - Search - Members - Calendar
Full Version: Redirecting Domains With Apache - Help!
Linuxhelp > Support > Technical Support
I hope someone can help me with this little problem:

I have a linux server running apache. My main website is running as I need to setup the server so that my other registered domains, eg.,, etc., will redirect to regardless of the page opened within the domain.

I am running DNS and have created SOA's for all the extra domains. Each one has only the following added:

CNAME - alias host: www target:

And nothing else - eg. No A, MX, etc.

When I go to one of the extra domains, I just get the server's 404 error page.

Someone in support told me I need to update the httpd.conf file - I have had a look, but this is really stretching my linux skills. Can anyone please tell me exactly what I need to add/edit on the httpd.conf file to update the HTTP headers for the above. Below is the entry for the main domain - there are no other entries for the extra domains:

DocumentRoot /home/domain/domain2/web
ErrorLog "|/usr/ins/intel/bin/webspy /home/domain/domain2/logs/error_log"
TransferLog "|/usr/ins/intel/bin/webspy /home/domain/domain2/logs/access_log"
RewriteEngine on
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*)$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/domain/domain2/users/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/domain/domain2/users/$1/web/$3
AddHandler server-parsed .shtml
AddType text/html .shtml
<Location />
Options +Includes

Many thanks,
Just shove the other domains under serveralias and restart apache.


I have the same setup with and

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.