This is our scenario:
- Our DNS is hosted by a company. They don't manage the DNS.
- We use Zoneedit (www.zoneedit.com) to manage the DNS such as nameservers, CNAMEs, etc...
- Then we have our web host where we just have our files hosted.
We have a subdomain created on zoneedit. We would like to do a URL rewrite so that subdomain.ourdomain.com is displayed as www.ourdomain.com/subdomain.
Do I use Zoneedit to do the URL rewrite or the web host or the DNS host?
I checked the Zoneedit docs but I could not find a way to do a URL rewrite. Need some advice.
Thanks
DNS only handles domain resolution to IP addresses (and back). It doesn't even know about HTTP.
URL rewriting can only be done on the web server.
URL rewriting is not possible with a DNS (even ZoneEdit).
The closest results you could achieve with them is using the WebForwards feature to forward any call to subdomain.ourdomain.com to www.ourdomain.com/subdomain (or to any other URL).
If you target a true URL rewriting then it must be configured at your web server level. Check the wikipedia page for the most common URL Rewriting web framework.
Url rewrite should be done on the webserver...
These Answers are wrong...
From the horses mouth (zoneEdit)...
The example they gave simple redirects the port.. But it can be used to rewrite and aspect of the URL.. Even to cloak it! Amazing for a free service level... Frankly I have no idea how / why they do it, lol.
So you're wanting a rewrite rather than a redirect, correct? This means the user will see the original URL and not the destination URL in their browser address bar.
Many DNS providers (including ZoneEdit) offer URL forwarding features these days - these can work as a simple 301/302 HTTP redirect (most commonly) or there is sometimes the option to enable "URL cloaking" which usually works by loading the destination page inside an HTML frame, keeping the original address in the address bar.
I doubt that ZoneEdit will be able to enable the forwarding/cloaking for only a subfolder, however - it's usually done for the entire domain.
The best solution would be to create your own HTML frame file on the main domain's web server that then loads the subdomain into itself.