Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Apache web server (on a Windows VPS) and a while ago I registered a .tk domain. Then I picked (ns1.afraid.org) and (ns2.afraid.org) as my name servers and I pointed mydomain.tk to 22.22.22.22/script (the website location e.x). Now when someone types mydomain.tk he goes to 22.22.22.22/script but the problem is in the address bar it still shows 22.22.22.22/script not mydomain.tk. How to solve this problem?

Thanks

share|improve this question
    
Which Record did you use to point to the IP? – DaGardner Jun 8 '13 at 16:27
    
I just checked that. It's Web Redirect, it doesn't let me to use "A" record because of "/script" part of my address. – Thomas Jun 8 '13 at 16:46
    
You have to use an "A" record and then create a virtual-host on your VPS – DaGardner Jun 8 '13 at 18:59
    
Yeah, But how? I have for example 5 directories and I can't just copy /script to the main directory. How to point /scirpt1 /scirpt2 and... to specific domains? – Thomas Jun 8 '13 at 20:20
    

Since you're using a web-redirect, the browser is obliged to tell the user what's going on. Redirects are &mbash; by nature — an interruption in the flow of web-surfing. DNS, on the other hand, is a little more trusted: it's considered just another way to refer to the same thing.

Assuming that you do not control server 22.22.22.22, there is no perfect solution — unless it's a service that specifically allows for you to use your own domain name. However, you could try embedding your 22.22.22.22/script website in an iframe, rather than redirecting:

<iframe width="100%" height=1"00%" src="http://22.22.22.22/script">

This will break bookmarks, and impede url-based navigation.

share|improve this answer
    
If you do control the 22.22.22.22 host, there is a way to do it, but I'm not sure how it works. – jpaugh Jun 8 '13 at 17:49
    
Yeah, I have the VPS. Isn't there any .htaccess solution? – Thomas Jun 8 '13 at 20:21
    
No good one at least. – DaGardner Jun 8 '13 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .