Replacing URLs in Blogs 

Run a command to replace URLs in your Blogs deployment to correct broken links.


Before you begin

.

To edit configuration files, use the wsadmin client. See Starting the wsadmin client for details.


About this task

There are cases where a collection of URLs in a Blogs deployment will break. For example, if a user changes from one deployment to another and the host name changes from lc95.cn.ibm.com to lc96.cn.ibm.com, all the URLs that use the form http://lc95.cn.ibm.com/xxx will break. Use this command to update URLs in the following places:


Procedure

  1. Start the wsadmin client following the steps in Administer Blogs using the wsadmin Client.

  2. Start the Blogs Jython script interpreter by entering the following command:

      execfile("blogsAdmin.py")

  3. Run the following command to fix broken URLs in entries and comments:

      BlogsAdminService.fixBrokenUrls(<replacePattern>, <replaceValue>)

      where <replacePattern> is the pattern of the part of the URLs that need to be replaced, and where<replaceValue> is the string to correct the URLs.

      For example:

       BlogsAdminService.fixBrokenUrls("http://example.com:9082/blogs", "http://example.com:9080/blogs")

      changes URLs with the form http://example.com:9082/blogs/xxx to http://example.com:9080/blogs/xxx.


Parent topic

Administer Blogs using the wsadmin Client


   

 

});