how can i do multiple subdomain redirection using control panel

September 24, 2015 2k views
Apache DNS Configuration Management WordPress Ubuntu


Can anyone help me in this iisue ..i face ...i use as control panel for using wordpress sites ..

but can't find how can i do multiple sub domain redirection suing digitalocen + ...

i try to use .htaccess to do this but only working one subdomain redirection ...mutiple sundomain redirection is not working ..

for example i need to redirect like this to

like this i have mutiple sudomain ...

can you tell me how this can be done ..any guide very helpful

2 Answers

Don't understand what exactly you want. But where do you have your domain registered and where do you have it managed? If you got the nameservers at digitalocean, you can manage all records inside the DNS management of DO.

  • Hi sir I need to redirect multiple subdomains to different urls. Tell me how can I do it

    • Like I said, depends where you have got it registered / managed.
      Most of the times you use a redirect 301 or rewrite rule inside your vhost of your webserver. The config you should use depends on what webserver you are using. So to give you more information you need to give more details about your server.


You can use the instructions here multiple times in the same .htaccess file:

For example, here's how you'd redirect two different subdomains:

RewriteCond %{HTTP_HOST}
RewriteRule (.*) [R=302,L]

RewriteCond %{HTTP_HOST}
RewriteRule (.*) [R=302,L]
Have another answer? Share your knowledge.