Appending sub directory to Masked Domain C#.Net
Posted on 2009-04-10
Okay so I have a domain name hosted with fasthosts, I'm not cash positive at the moment so I'm hosting the website on my home computer for development purposes etc. I got the email and web forwarding package for £15pa which allows me to forward my domain name and mask it.
Here's my setup:
Domain on fasthosts: "www.mydomain.com" > Points to > "myname.dyndns.org" which in turn points to my IP Address and is updated by my router.
This works fine, however in IE if I go to www.mydomain.com just as in FF the address bar contains only the domain name regardless of which sub directory i may be in. And in the status bar I can see the proper URL "myname.dyndns.org" when I navigate around the site.
In IE if I try to post a form it won't go through, now the address in IE is still just "www.mydomain.com" but if I change it to say: www.mydomain.com/form/directory/theform.aspx everything works fine and the form goes through.
So my question is:
When I retrieve the URL as in HttpContext.Current.Request.URL.Host I get "myname.dyndns.org" and HttpContext.Current.Request.URLReferrer.Host I get "www.mydomain.com"
So is there any way to say append the orginal sub directory from the root that we're in to the URLReferrer, something like:
URL Referrer Currently: www.mydomain.com
Actual URL: myname.dyndns.org/dir/form.aspx
Appended Referrer: www.mydomain.com/dir/form.aspx
As I believe then everything would work fine.
I'm sorry if anyone finds me difficult to follow, I'm not very good at explaining things.
Thanks for the help in advance
PS: I tried setting up BIND 9 to resolve my domain name issue but you have to get registered as a nameserver with your host and everything plus I'm on a dynamic IP. But if anyone has had any experience with BIND, nameserver and dynamic IP setup any pointers would be appreciated.