Pages

Showing posts with label domain. Show all posts
Showing posts with label domain. Show all posts

Thursday, June 26, 2014

Fix wordpress image urls in post on migration

Whenever we migrate wordpress from old domain to new domain we seldom encounter url errors where image urls in post do not get updated etc..

To Tackle this out here is a simple sql script

 UPDATE wp_posts SET post_content = REPLACE (  
 post_content,  
 'olddomain.com/wp-content/',  
 'newdomain.com/wp-content/');  

Sunday, July 8, 2012

cross domain request using jquery

Unfortunatly cross domin access is not available to functions placed in other domain in a json file that return data.

One way out is to show the same in a .php file or an .asmx page but what if we want the interface to be platform independent...



The way out is to host JSON services using jsonp or "JSON with padding"



http://en.wikipedia.org/wiki/JSONP



To make a cross domain Json request use the following Jquery function



http://api.jquery.com/jQuery.ajax/