Page 1 of 1

How redirect to

Posted: Thu Feb 08, 2018 6:39 am
by Rhodwulf

I have an issue, i created a subdomain for my irc server,and i want to redirect all the traffic from to , because i have a webirc installed on my site.

I configured a .htaccess file and dont work, i try a redirect since an index.php and index.html and dont work.

┬┐Why if i create a subdomain this redirect me to the folder of the principal domain?

Thanks in advance.

Re: How redirect to

Posted: Thu Feb 08, 2018 11:11 am
by putude
I don't know is it work or not, but you may try it.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$$1 [R=301,L]

Re: How redirect to

Posted: Thu Feb 08, 2018 5:41 pm
by Rhodwulf
Precisely it is the code that i used in the .htaccess file

I forgot to mention that if I write this show the default page of vesta, my doubt is still because redirects me to and does not read the files in the folder.


Re: How redirect to

Posted: Sat Feb 10, 2018 4:24 am
by noogen
Now you're making confusing statement. Did the redirect work? If so, then why do you care if index.html show the Vesta default?

If it didn't work, then did you put into the Aliases field of If you just point the DNS to IP address and didn't setup in the web panel/tab, then that's the reason why it's pointing to default Vesta index.

Also, are you setup with apache or nginx+php-fpm? .htaccess only work with apache. If you're on nginx+php-fpm and is seeing the redirect, then it may be your app that is redirecting. Example, you can set the default domain in Wordpress and it'll redirect for you without htaccess.