Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- 301-redirect though URLs don't change?


indyank - 3:33 am on Nov 3, 2012 (gmt 0)


I have to manage a redesign of old static sites and their pages have .html-Urls. As the new CMS will be Wordpress and WP doesn't allow .html-Urls for pages I think about a 301-redirect.


Are you sure you only want to migrate your static sites to "Pages" in wordpress? Why not Posts?

Also try this code in your functions.php for pages:

add_action('init', 'my_page_permalink', -1);
function my_page_permalink() {
global $wp_rewrite;
if ( strstr($wp_rewrite->get_page_permastruct(), '.html') != '.html' )
$wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html';
}


Thread source:: http://www.webmasterworld.com/google/4515006.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com