Forum Moderators: phranque

Message Too Old, No Replies

Replace Chacarter in Dynamic URL

How to replace a chacarter in dynamic url

         

Sgroove

11:35 pm on Feb 2, 2011 (gmt 0)

10+ Year Member



Hello, I'm new in the forum.

This is my issue.

I have images URL pulled from XML feed.

The image URL is:

www.domainname.com/files/1234567123456/1234_h.jpg

and I want to internally replace it with:

www.domainname.com/files/1234567123456/1234_g.jpg

basically the _h at the end of the URL becomes _g

This should happen before that the images are loaded..

Any idea?

Thank you very much

g1smd

11:53 pm on Feb 2, 2011 (gmt 0)

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



Are the images on your server, or some other?

Sgroove

11:55 pm on Feb 2, 2011 (gmt 0)

10+ Year Member



not on my server

jdMorgan

8:10 pm on Feb 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Place a rewriterule on the image-hosting server to accept requests for your modified "g" URLs and rewrite them to the correct "h" image filepaths.

Since the requests are going to the image server, the code must be located there.

Jim