File: //old_home_backup/answerbag.co.uk/public_html/.htaccess
# invoke rewrite engine
RewriteEngine On
RewriteBase /
# Redirect to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#Redirect 400,401,403,404,500 to main website
ErrorDocument 400 http://answerbag.co.uk
ErrorDocument 401 http://answerbag.co.uk
ErrorDocument 403 http://answerbag.co.uk
ErrorDocument 404 http://answerbag.co.uk
ErrorDocument 500 http://answerbag.co.uk
# add trailing slash if missing
rewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ $1/ [NC,R=301,L]
RewriteRule ^wp-admin/ - [L]
RewriteRule ^([^/]+)/$ $1.html
RewriteRule ^([^/]+)/([^/]+)/$ $1/$2.html
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3.html
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4.html
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ $1/$2/$3/$4/$5.html
RewriteRule ^index.html$ / [L,R=301]
redirectMatch 301 ^/loans/payday-loan/industry-report/?$ payday-loans/industry-report/
redirectMatch 301 ^/loans/mortgages/?$ mortgages/
redirectMatch 301 ^/loans/student-loans/?$ student-loans/
redirectMatch 301 ^/news/?$ news-and-reports/
redirectMatch 301 ^/news/fca-set-launch-inquiry-zombie-funds%e2%80%8f/?$ news/fca-set-launch-inquiry-zombie-funds_e2_80_8f/
redirectMatch 301 ^/blog/?$ blog/page/1/