Welcome to WebmasterWorld Guest from

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Windows host to modify the WordPress function to achieve a 301 redirec

modify the WordPress function to achieve a 301 redirec

2:48 am on Mar 17, 2012 (gmt 0)

New User

5+ Year Member

joined:Mar 17, 2012
posts: 3
votes: 0

Hello, everyone, I'm from China.Today I share with you about amending the wordpress function to achieve a 301 redirect,This function is wp-blog-header.php,The specific process is as follows:

1.To find the root of the site following the wp-blog-header.php file, make a backup
2.The use of professional programming tool to open this file, I am using Dreamweaver
3.The best place to start of file, enter the following code:
if (strtolower($_SERVER['SERVER_NAME'])!='www.kerry86.com')
if(strtolower($URIRedirect)=="/index.php") { $URIRedirect="/"; }
header('HTTP/1.1 301 Moved Permanently');


4.To cover the wp-blog-header.php file of the web root directory

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members