Moving your mango blog to a new location

Tonight I made a decision to move my blog to a different domain and because of that a new location on my server. Originally, I placed the blog under one of my photography related domain names with the plan to make posts about web development and photography all in one place. After a week or so passed, I decided that it was best to maintain completely separate blogs for content that is really unrelated. So, I made the change tonight which should have been really fast but instead took a little longer than it probably should have.

I went ahead and purchased a new domain for the blog, configured the dns record and then went ahead and configured both Apache and Railo. I grabbed the entire mango directory from the old location and moved it to its new home. I immediately took a look at config.cfm which seemed to have lost its code indenting at some point, but did not seem to notice anything relating to a physical location for the blog engine.

I planned to use the same database schema so I went ahead and tried to load my blog at the new domain. I was greeted with an error stating that my files could not be found and it was obvious why, as it was still looking in the old location. The old location was in a "blog" sub directory and the new location is directly off of the root of the site, so it made it easy to determine the issue.

At this point, I assumed that the url and path were located in the database, so I looked at the tables and zeroed in on the "setting" table with no luck. This sent me to the web to do a little searching and of course I found some info again directing me towards config.cfm. I now assume that in an older version of Mango the url and base path info was stored in config.cfm but not anymore. I also tried to place the setup directory back into its original location, but it would not allow me to use my exisiting schema or import from my exisiting blog so I retreated from that path.

After a little head scratching, I looked in the database again and noticed the "blog" table, BINGO! I changed the "url" and "basepath" fields to the correct values and after restarting Railo my new blog was up and running.

The last step was to remove the blog files from the old location and create a application.cfm file with a cflocation tag to the new location and a "status code" attribute of 301 to signify a permanent redirect for search engine bots.  I wanted to add the cgi.referrer path to my new location but I'm having a hard time determining how to get the url variables since I can not use the cgi.querystring variable due to the lack of "?" to set the variables. Any ideas on how to do that?

 

Comments

Write your comment

(it will not be displayed)

Leave this field empty: