redirecting path for images

Discuss practical ways rearrange URLs using mod_rewrite.

redirecting path for images

Postby ntr123 » Fri Jun 27, 2008 3:16 am

Hi,

I need some help redirecting path for images in http server.

we have old server as catalog.something.com/images/12/12.gif

Also has same images on www.newhost.com/images/12/12.gif

At this time images are pointing to catalog.something.com/images/12/12.gif on www.newhost.com in product center.

I would like to point to www.newhost.com/images/12/12.gif using rewrite in httpd.

Can you please help me?


Tony
ntr123
 
Posts: 1
Joined: Fri Jun 27, 2008 3:13 am

Postby richardk » Sat Jun 28, 2008 4:31 pm

The image path in the source code of the page is catalog.something.com/images/12/12.gif and you want it to be newhost.com/images/12/12.gif? Then you would have to have a redirect on the old server (catalog.something.com). Mod_rewrite does not chnage the URL in the source code of the page.

In catalog.something.com's <VirtualHost>
Code: Select all
Redirect 301 /images http://newhost.com/images
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 112 guests

cron