0

please i need your help.

i have one domain www.x.com and fr.x.org ( this domain is redirected to my server with A record )

my website is hosted in a server ( www.x.com) i parked the domain fr.x.org its showing the same website ( www.x.com) but the url in the address bar is changing . when i visit fr.x.org i see in the address bar www.x.com. i want to keep fr.x.org/index... i tried with htacces it's working but when i try to login to my member is not working. i found some solution to use vhost but i really dont know how to do . please can you help me ? thank you

Max Tech
  • 1
  • 1

2 Answers2

0

You will need name based virtual host to achieve this. The link is the description of this feature in Apache as you haven't posted what server software is used. But the same feature exists in other server software like nginx as well.

Zoltan Magyar
  • 874
  • 1
  • 6
  • 19
0

thank you Zoltan for your quick reply.

i'm using apache2.

i know that i need to do that with vhost this is my first time i dont know how to do it.

this is my current vhost ( created automatiqly by my cpanel) :

    <VirtualHost 162.214.xxx.xx:80>
  ServerName x.com
  ServerAlias fr.x.org mail.x.com mail.fr.x.org www.x.com www.fr.x.org
  DocumentRoot /home/xwwwfolder/public_html
  ServerAdmin webmaster@x.com
  UseCanonicalName Off
</VirtualHost>

<VirtualHost 162.214.xxx.xx:443>
  ServerName x.com
  ServerAlias fr.x.org mail.x.com mail.fr.x.org www.x.com www.fr.x.org
  DocumentRoot /home/xwwwfolder/public_html
  ServerAdmin webmaster@x.com
  UseCanonicalName Off
</VirtualHost>

with this configuration i can access www.x.com and fr.x.org ( ALIAS OF X.COM) .

but when i visit fr.x.org i see in the bar address https://www.x.com

Br

Max

Max Tech
  • 1
  • 1
  • Rather than commenting your question you should have edit your question adding the additional information to the original question. I have commented my answer to help you out on this. – Zoltan Magyar Feb 04 '21 at 11:32