Forum Moderators: phranque

Message Too Old, No Replies

Help with changing URL.

         

rdoggart

3:02 pm on Sep 12, 2008 (gmt 0)

10+ Year Member



I have a reverse proxy setup ( the client facing server is support-el3.local, and the internal server is bfs-kps-1) which uses ProxyHTMLURLMap and rewrite rules and it all works fine for all links except one link that is causing problems:

http://support-el3.local/uks/servlet/DisplayAcrobatSolution/RLN_0007_0_0_009.doc.pdf?resultNumber=0#xml=http://bfs-kps-1:7001/uks/servlet/HighlightAdobe/1221213525925.txt?resultNumber=0&highlight=none&highlightTerms=true

This is the link that is shown on the client, the first reference support-el3.local is valid and has been proxied. The second reference bfs-kps-1 is wrong and should be support-el3.

But I cannot figure out how to get this part of the URL to be changed.

Ronnie

[edited by: jdMorgan at 3:34 pm (utc) on Sep. 12, 2008]
[edit reason] De-linked proxy URL strings [/edit]

jdMorgan

3:32 pm on Sep 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That erroneous path is not part of the URL, it is part of a query string attached to the URL.

The way you change it is to find the code that generates that link, and change the code.

If necessary, you can redirect the request, changing the query string. But this does not change the URL or the original query string, since URLs and query strings are defined by the links on the page that includes them (or the code that generates that page).

If you wish to redirect this request, see Apache mod_rewrite, check the URL with the RewriteRule pattern and use a RewriteCond examining the server variable %{QUERY_STRING} to check the appended query string and to create back-references to it (if desired). However, I strongly suggest that you correct the code that generates the invalid query data, rather than putting a redirect band-aid on the problem.

Jim