Mobile app version of vmapp.org
Login or Join
Berryessa370

: Domain on NameCheap, Hosting on GoDaddy: Redirect Loop I tried searching, but since I'm pretty new to networking I may not have used to right keywords, so I apologize if I missed the answer.

@Berryessa370

Posted in: #Dns #Godaddy #Namecheap #Redirects #Url

I tried searching, but since I'm pretty new to networking I may not have used to right keywords, so I apologize if I missed the answer.

My friend owns a domain friendsmusic.com and I have hosting at mydomain.com/friend I want him to point to.

All my code uses relative paths, but I want to make sure when someone visits friendsmusic.com they see the page I'm hosting, but the URL in their address bar remains friendsmusic.com and when they click on the contact page the address bar reads friendsmusic.com/contact and not mydomain.com/friend/contact

At the moment NameCheap has an alias setup to my hosting, but it's resulting in a redirect loop. Note that I don't have any code which redirects.

Anyone know what the DNS/etc. settings should be?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Berryessa370

2 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale272

It's not strictly a DNS setting. You would have to change the settings on your web server.

You will need to have the friendsmusic.com DNS A record point to the IP Address that mydomain.com/friend is hosted at.

Then assuming you are using an Apache web server you can go into the configuration file example: /etc/apache2/apache2.conf and create a mod_rewrite condition. Similar to this. I suppose you might be able to create an .htaccess file instead of directly editing your server configuration file which you may not even have access to depending on your host. Check out this answer as well.

10% popularity Vote Up Vote Down


 

@Deb1703797

The only solution I can think of here is a server alias.

A server alias points to your domain name on web server level. It can send the user somewhere without the URL changing

But you must note:


the domain should be hosted at your hosting company
you should redirect all links to example.php/. Note the /, otherwise the real URL will be shown.


It's a decent alternative for frames.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme