Code Snippets

301 Redirects Using HTACCESS

A quick look at writing 301 Redirect in your HTACCESS file.

This is the cleanest way to redirect a URL. Quick, easy, and search-engine friendly. Remember HTAccess stuff is for Apache servers only.

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

Redirect an entire site

This way does it with links intact. That is www.oldsite.com/some/crazy/link.html will become www.newsite.com/some/crazy/link.html. This is extremely helpful when you are just “moving” a site to a new domain. Place this on the OLD site:

Redirect 301 / http://newsite.com/

Source: http://css-tricks.com/snippets/htaccess/301-redirects/

Hire a WordPress Expert

Get hourly and project based theme customization, theme tweaks, and development help from an experienced Kelowna WordPress developer.  We’ve been building WordPress websites full-time for over a decade. We can help you.