Rewrite URL

Hi,

my ISP is blocking port 80, so I have Apache running on a SuSE 9.1 which is listening on port 8000
I also have my own domain registered ( my.domain.com ) but nowhere hosted.
I uses the (free) services of dyndns (mydomain.dyndns.org)
The provider with which I registered my domain has setup an URL forwarding, so my.domain.com is forwarded to mydomain.dyndns.org:8000
I can now surf to my server without any problem. However when I look at some links, it is pointed to "http://mydomain.dyndns.org:8000/link" instead of "http://my.domain.com/link".
I can go directly to "http://my.domain.com/link", that works fine.
How can I hide "http://mydomain.dyndns.org:8000"

Rgrds,
Filiep.
LVL 1
filiepAsked:
Who is Participating?
 
Karl Heinz KremerConnect With a Mentor Commented:
You are using relative links on your web page. Therefore, the browser (and not the server) will "build" the actual URL out of the base path and the relative URL. There are two ways you can resolve this, one is you can use absolute links on all your pages, or, you can set a base path at the top of your web page. You can find more information about the BASE path here: http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 (this needs to go into the HEAD element of your pages.

A relative link is something like this: <A HREF="/the/new/path.html">, whereas the same path as an absolute path would look like this: <A HREF="http://my.domain.com/the/new/path.html">
0
All Courses

From novice to tech pro — start learning today.