We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
2 domains -> one directory (redirect additional domain)
2 domains -> one directory (redirect additional domain)
Hello everyone,
I am first time here, so nice to meet you all.
I have created a web account for domain: mydomain.md, Vesta automatically created all needed directories for my website inducing the mydomain.md directory itself.
Now i have parked a second domain: myseconddomain.uni.me, and Vesta created another set of needed directories for that domain as well, including the second directory - myseconddomain.uni.me, as this would be a separate website.
Thing is i want both domain to point to one website directory: mydomain.md.
I know it is being done via .htaccess, i have searched here and there, tried many online examples, yet it doesn't work. I may be even placing the .htaccess file in a wrong directory.
Could anyone please help me with an example of .htaccess file to point the second parked domain to another website directory in Vesta?
Thanks a lot!
I am first time here, so nice to meet you all.
I have created a web account for domain: mydomain.md, Vesta automatically created all needed directories for my website inducing the mydomain.md directory itself.
Now i have parked a second domain: myseconddomain.uni.me, and Vesta created another set of needed directories for that domain as well, including the second directory - myseconddomain.uni.me, as this would be a separate website.
Thing is i want both domain to point to one website directory: mydomain.md.
I know it is being done via .htaccess, i have searched here and there, tried many online examples, yet it doesn't work. I may be even placing the .htaccess file in a wrong directory.
Could anyone please help me with an example of .htaccess file to point the second parked domain to another website directory in Vesta?
Thanks a lot!
Re: 2 domains -> one directory (redirect additional domain)
I think I understand what you are trying to do, and I don't understand please correct me.
Let's say that you purchased the three domain names afn.me, afn.pw and afn.im but you want afn.pw, and afn.im to redirect to afn.me, what you can do so afn.pw, and afn.im is create an index page with the following code and say something like along these lines “you should be redirected to AFN.ME, if for some reason your browser isn't redirecting you to AFN.ME please click here to be taken to AFN.ME.” and also upload a .htaccess file with the following code so that way if anyone enters anything it will redirect them to the home page which the homepage will then redirect the visitor to afn.me .
So that is one way how you can add domain names and everything will redirect to one domain name.
Let's say that you purchased the three domain names afn.me, afn.pw and afn.im but you want afn.pw, and afn.im to redirect to afn.me, what you can do so afn.pw, and afn.im is create an index page with the following code
Code: Select all
<meta http-equiv="refresh" content="0; url=http://afn.me" />
Code: Select all
ErrorDocument 404 /index.php
So that is one way how you can add domain names and everything will redirect to one domain name.
Re: 2 domains -> one directory (redirect additional domain)
Thanks for reply. You did not quite understood my task. I have one website and two working domains, and need it to be fully accessible via bothy domains at same time, i want to keep both domain visible and properly indexing friendly by search engines.AFN wrote:I think I understand what you are trying to do
For example, i want the URL http://mypaiddomain.md/directory/file.php to also fully work as http://myfreedomain.uni.me/directory/file.php, and these both URLs are basically displaying the same website.
And that i guess that can be done via .htaccess file only.
Thank you.
Re: 2 domains -> one directory (redirect additional domain)
You are right , this can be done with the rewrite rules. I have some rewrites rule but it is not point to another domain. It just re-write e-g if you tyme , domain.com/index.html , it will rewrite it to index.php. Here is something from my htaccess , so i think you can take a look and try to modify.AzMandius wrote:Thanks for reply. You did not quite understood my task. I have one website and two working domains, and need it to be fully accessible via bothy domains at same time, i want to keep both domain visible and properly indexing friendly by search engines.AFN wrote:I think I understand what you are trying to do
For example, i want the URL http://mypaiddomain.md/directory/file.php to also fully work as http://myfreedomain.uni.me/directory/file.php, and these both URLs are basically displaying the same website.
And that i guess that can be done via .htaccess file only.
Thank you.
Code: Select all
RewriteEngine On
RewriteBase /
RewriteRule ^index.html?sid=(.*)$ index.php?sid=$1
RewriteRule ^index.html index.php
if it is just for domians and NOT the exact re-writes , i think you can just create a cname for that e-g , sub1.domain.com ---> create a cname for it to domain.com , so if you type sub1.domain.com , it goes to domain.com ,
Re: 2 domains -> one directory (redirect additional domain)
Thanks for cname suggestion, I'd still prefer to achieve that using .htaccess.