apache - Multiple subdomains to same address -


i want redirect multiple subdomain same address. let's want www.sitename.com , sitename.com redirect same address.

do have say;

<virtualhost www.sitename.com:81>     .     .     . </virtualhost>  <virtualhost sitename.com:81>     .     .     . </virtualhost> 

or there simple solution.

yes, if wish use multiple addresses subdomains same location can this.

<virtualhost *:81>      servername example.com      serveralias www.example.com sub1.example.com sub2.example.com      documentroot /var/www/example.com      #more stuff etc here if needed     </virtualhost> 

it's part of name based virtual host.

http://httpd.apache.org/docs/2.2/vhosts/name-based.html


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -