Mia
17th Sep 2009, 06:44 pm
I have 7 pages on the current UF blog that I will need to redirect when I launch the new site.
The pages are still there they have just moved to a new folder.
E.G. I want to Change http://www.urbanfoodie.net/recipes/the-perfect-soft-boiled-egg/ To http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/
N.B. The pages have Wordpress SEF on them
Do I need to:
1 Create recipes/the-perfect-soft-boiled-egg.php and add to header:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/" );
?>
2 Create recipes/the-perfect-soft-boiled-egg/index.php and add to header:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/" );
?>
3 Update the .htaccess file with:
redirect 301 /recipes/the-perfect-soft-boiled-egg/ http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/
As you can see I'm a bit confused by 301 redirect and can't try things out because I haven't moved the site yet.
Help much appreciated!
The pages are still there they have just moved to a new folder.
E.G. I want to Change http://www.urbanfoodie.net/recipes/the-perfect-soft-boiled-egg/ To http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/
N.B. The pages have Wordpress SEF on them
Do I need to:
1 Create recipes/the-perfect-soft-boiled-egg.php and add to header:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/" );
?>
2 Create recipes/the-perfect-soft-boiled-egg/index.php and add to header:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/" );
?>
3 Update the .htaccess file with:
redirect 301 /recipes/the-perfect-soft-boiled-egg/ http://www.urbanfoodie.net/blog/the-perfect-soft-boiled-egg/
As you can see I'm a bit confused by 301 redirect and can't try things out because I haven't moved the site yet.
Help much appreciated!