I'm running a site on an apache server named www.example.com which has sub.example.com subdomain. Also I have a vps, which is accessable through x.x.x.x IP adress. sub.example.com is redirected to x.x.x.x/example with htaccess So I can reach my files on x.x.x.x/example through sub.example.com.
Everything is ok with this. But I want to solve this issue with DNS. How can I achieve that?
I'm using cpanel on www.example.com.
I searched a lot about that issue and find some information. I just know I have to create an A record for subdomain pointing x.x.x.x Also I read about i should set virtual server on apache. But I'm not fully aware of apache settings. One last thing is I want my subdomain to point only x.x.x.x/example. So I need a step by step guide.