htaccess 301 redirect
i used to have a wordpress blog and 开发者_StackOverflow中文版removed it. Now i have a lot of my old blog urls in Google search results. Here are a fre examples
http://mywebsite.com/2011/01/3360
http://mywebsite.com/2011/06/3450
http://mywebsite.com/2011/02/3456
http://mywebsite.com/2010/01/3547
http://mywebsite.com/2010/02/2264
How can i redirect all dead urls that start with 2010 and 2011 in it. My htaccess file would get very long if i had to input each url into the htaccess file.
Have this rule in your .htaccess file:
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteRule ^201[01]/ /my-new-page [R=301,L]
精彩评论