Wednesday, 6 November 2013

RewriteRule; Moved Permanently

I was getting high numbers of 404 "file not found" on my server do to discontinued blog's I hosted long a go. To reduce those numbers I used .htaccess to redirect all requests to another page using the 301, "Moved Permanently" code.

RewriteRule ^blogfolder\/?(.*)$ "http\:\/\/newdomain\.com\/" [R=301,L]
Live example: