Forum Moderators: phranque

Message Too Old, No Replies

Could any one solve this problem

URL Migration

         

pushparaj

12:33 pm on Dec 2, 2005 (gmt 0)

10+ Year Member


Hi all,
I am having a live site in which all pages have some page ranking. Now I want the site to moved to a CMS site whose urls for contents are different. How can
i migrate the urls of original site to new site.Could
anyone help in this regard. And also If anyone make a
bookmark on the live site, after i moved the new site
they will get file not found error. Please help to resolve this problem.

Thanks in advance
Push

jdMorgan

5:03 pm on Dec 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Push,

Welcome to WebmasterWorld!

The usual approach is to make the CMS 'transparent'.

That is, nothing on your site should show a user or robot that anything has changed. Thus, you keep your pagerank, backlinks, and user bookmarks.

You keep and continue to use the "old-style" URLs, then use mod_rewrite to 'map' those old URLs to the form needed by the new CMS.

Take a look at your browser addres bar -- [webmasterworld.com...]
This URL does not really exist, since WebmasterWorld is almost completely a dynamic, database-driven site. However, a request for /forum92/5097.htm can easily be mapped to a script to generate the pages using mod_rewrite code -- something like:


RewriteRule ^forum([0-9]+)/([0-9]+)\.htm$ /page_generation_script.php?forum=$1&thread=$2 [L]

This converts a request for a static forum page URL into a call to the dynamic page-generation script, passing the forum and thread numbers from the requested URL to the script as a query string. It is done completely inside the server, and the user never sees any evidence that the site is dynamic.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

pushparaj

1:55 pm on Dec 5, 2005 (gmt 0)

10+ Year Member



Hi Jim,

Thanks for your reply. Can we execute a PHP script within the server i.e after the rewrite rule? If it so please help me

Thanks in Advance
Pushparaj

jdMorgan

2:31 pm on Dec 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, that's exactly what the example I gave above does, it invokes the script "/page_generation_script.php" with parameters of "forum=" and "thread=", and with their values taken frome the requested URL.

Jim