Author Topic: how to create domain alias  (Read 1930 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
how to create domain alias
« on: October 26, 2016, 05:10:58 PM »
Hi,

Ive been using CWP for a while.. I have a simple question though..

I have a DOMAIN.COM which is the main domain..

And I have DOMAIN.COM.XX which I want to be redirected to DOMAIN.COM.

How can I do that? could someone help me out? should I create a new domain and add .htaccess? or CWP provide a tool manage site redirection? if so, where is it?

Thanks!


Offline
*
Re: how to create domain alias
« Reply #1 on: March 16, 2017, 12:26:49 PM »
BUMP!
;)

Offline
*
Re: how to create domain alias
« Reply #2 on: March 17, 2017, 07:32:52 AM »
google for htaccess redirect


Offline
*
Re: how to create domain alias
« Reply #3 on: May 31, 2017, 07:57:42 AM »
I have the same question. .htaccess redirect is not an answer because the redirect is not an alias.

Offline
*
Re: how to create domain alias
« Reply #4 on: December 02, 2017, 07:35:42 PM »
The .htaccess simply is not an answer.
To apache interpret the .htaccess file, the access MUST be arrived at the server, within the path, to interpret this file fontent.
If the access of the alias domain already comes to a directory on the server, the .htaccess should be not needed anymore.

The question is exactly how to make the apache server direct the access of that domain alias to a directory on the server.

Offline
*
Re: how to create domain alias
« Reply #5 on: December 02, 2017, 07:53:07 PM »
To make an alias to your domain, you can use the ServerAlias directive of apache server, in the file '/usr/local/apache/conf.d/vhosts.conf'.

If you have, for example:
----------------------------------------------
ServerAlias domainexample.com
----------------------------------------------

you can manually edit to:
--------------------------------------------------------------------------------------
ServerAlias domainexample.com server2.domainexample.com
--------------------------------------------------------------------------------------

or:
------------------------------------------------------------------------------------------------------------------------------
ServerAlias domainexample.com server2.domainexample.com server3.domainexample.com
------------------------------------------------------------------------------------------------------------------------------

or:
------------------------------------------------------
ServerAlias *.domainexample.com
------------------------------------------------------
etc.

The only question I have is, if editing manually, the changes would be overwritten by changes made via panel, ou updates.

Regards,
Netino