Redirection or Rewriting Rule - Please HELP.

Topics: Developer Forum, User Forum
Sep 23, 2009 at 2:22 PM

Hello,

On our server we have pictures in HTML with relative URL like this /picturesFolder/picture.jpg we access page with IP address so html displayed url http://xxx.xxx.xxx.xxx/picturesFolder/picture.jpg and everything was fine.

We now have domain that point to other folder and pictures are broken. We need to point all pictures that have /picturesfolder in path to diferent url/path

Example of generated html img tag:
<img src="http://www.someurl.com/picturesFolder/picture.jpg" alt="some text" />

should be

<img src="http://xxx.xxx.xxx.xxx/picturesFolder/picture.jpg" alt="some text" />

Should we use redirection or rewriting rule for this? And please send us back Rewriting/Rediretion Rule.

Thanks in Advance.

Sep 23, 2009 at 3:12 PM

I just find simple solution.... :-)

RedirectRule ^/(pictureFolder.*)$  http://xxx.xxx.xxx.xxx/$1