New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

how to create domain alias

Started by fredo, October 26, 2016, 05:10:58 PM

Previous topic - Next topic

fredo

Hi,

I´ve 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!



martexx


gosha

I have the same question. .htaccess redirect is not an answer because the redirect is not an alias.

Netino

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.

Netino

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