• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

301 redirect on 40,000 pages to one page - Need some advice


UFO Hunter
Hi guys,

I need a little advice here regarding 301`s. Im working on a website (not mine) which has a large directory (not links directory, places directory) with around 40,000 pages. I need to redirect all those pages to another page on the same domain using a 301.

Im not moving the whole directory just most of pages. There`s lots of duplicate content and with the new google penguin update its starting to affect the website rankings

The list has been compiled, but when I drop the rules into the htaccess file, the whole site goes down on a 500 internal server error. All the redirect rules are correct and have been double checked.

The htaccess file is around 6 -7 mb with the added 40,000 rules.

Does anyone have any suggestions on how I can get all the redirects to successfully work? Just to make this clear its for the same domain, not jumping to another domain and there`s no daisy chains within the rules. I done some googling but cannot find a fix.

I also have no access to the database or admin access to the script because it has client details, so I cannot drop the pages via the database and route them to a custom 404

Also why is it causing a 500 error, could that be due to apache server load because of the htaccess size?

Thanks :)
Last edited:
Have you tried this:

Header( "HTTP/1.1 301 Moved Permanently" ); 
Header( "Location: http://www.yourdomain.com" ); 
Thanks for your reply, I eventually got access to the database and removed all the pages sending them to a custom 404.