This is the easy, quick and cleanest way to redirect a URL at Apache server. It is search-engine friendly method and works best for Apache server.

301 Redirects htaccess

How to redirect single url via htaccess

Redirect 301 /oldpage.html http://www.mydomain.com/newpage.html
Redirect 301 /oldpage2.html http://www.mydomain.com/folder/

How to Redirect an entire site via htaccess

This is wildcard redirect. Individual pages will be redirect to same permalink of new site e.g. www.olddomain.com/event/some/link.html will become www.newdomain.com/event/some/link.html. When you are moving entire site to the new domain, it works better.

Redirect 301 / http://newdomain.com/

 

Pin It on Pinterest

Shares
Share This