Forum Moderators: phranque
I need a bit of help. I have a blog that I have recently moved from Typepad to a self hosted wordpress install, however There were a lot of <img> tags in the various posts whose src attribute was pointing to typepad's servers.
I am wondering if I can use mod_rewrite to rewrite the urls when the image is requested so that they are coming from a different server (one that I control, where a copy of the images is stored) to save me replacing all the img tags in 3 years of blog posts manually?
thanks in advance
Matt
you must do that rewrite from the typepad server since that is where the request is going.
I thought that might be the case, unfortunately I can't as our account was closed so I don't have access to the servers anymore. I was hoping I could intercept and rewrite the outbound links.
Are there any other ways that I might be able to acheive this? I'm thinking of some kind of JS action?
cheers
img src="http://www.example.com/images/whatever.jpg"
You could export the relevant database table as a text file (SQL, including "Drop Table If Exists") then use a decent text editor to do a "find and replace" on "example.com/images", change it to wherever the images now reside (e.g. "example2.com/images"), then re-import the database table.
Apologies if I misunderstood you.
...