Forum Moderators: phranque

Message Too Old, No Replies

Absolute Path Rewrite

html path rewriteing

         

touch

5:12 pm on Jun 7, 2010 (gmt 0)

10+ Year Member



Hello Everyone,

I am having a hard time finding information on what it am trying to do. We have an internal webpage that has absolute paths for all the links (ie [internal.corp.com)....] This is working fine internally be we are trying to setup a proxy to make the page available externally. The proxy will translate it to something like [external.corp.com....] The problem we are running into is all the paths externally appear as [internal.corp.com...] because they are absolute. We can not change any of the paths, or modify the webpages in any way. Is there any way to make apache rewrite the html paths in the pages.

I know that mod_rewrite cannot do this but i am hoping for some other option.

Thanks

g1smd

10:55 pm on Jun 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hard-coding the domain name in the links was the wrong thing to do.

The links should have read
href="/path/to/the/file.ext"
.

That's going to be the best fix.


There are other ways, but they are slow and inefficient and a pain in the proverbial to set up and keep running.

One is to set up a server that can be accessed from the outside world. On that server you have a script that when called from the outside world, simply GETs the correct file from your internal server, parses the page and replaces the domain name in the links and then sends that page to the outside world to the user.

haidivolume

9:42 am on Jun 8, 2010 (gmt 0)

10+ Year Member



Is there any way to rewrite a path to an absolute url rather than a relative url address?

touch

1:01 pm on Jun 8, 2010 (gmt 0)

10+ Year Member



There is no way to change the paths. The pages are part of a software package that our company purchased that can not be changed easily.

jdMorgan

5:25 pm on Jun 8, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Nick Kew's mod_proxy_html.

Jim