Home / Blog / WordPress Wildcard Redirect

WordPress Wildcard Redirect


Whether you are moving your WordPress site from a subdomain to a domain name or from one domain to another, you should redirect all old pages to new pages for SEO or other purposes. For example, you’ll want to redirect http://oldsite.com/example-page/ to http://newsite.com/example-page/. How can you accomplish this within WordPress installation? You can add multiple 301 redirect codes to .htaccess file (located in WordPress root diretory) or just simply adding this:

RedirectMatch 301 /(.*)? http://www.newsite.com/$1

You need to replace http://www.newsite.com/ with your own domain name.

Tags: ,