How to Redirect Known Pages and Wildcard for Everything Else with htaccess

  • Updated on
  • read
  • Add to Flipboard Magazine.

I recently worked on a project which needed me to shut down a WordPress blog and migrate it’s content. I had about 20 posts and pages that were going to migrate but everything else was going to be deleted. Since htaccess runs their commands from the top to the bottom, place your known redirects above your catch all redirect.

 

Written by: Jacob Lett - Jacob started BootstrapCreative to help others learn web design and development. He has built websites for 10+ years for companies and as a freelancer. He enjoys learning and encouraging others to improve their skills.
Category: Code Snippets
Tags: ,

Want to Get Email Updates?

Receive a monthly digest of new tutorials and resources.





Advertise Here