Monday 17 December 2012

Make sure you finish your website with some .htaccess and robot.txt House Keeping.

After just finishing the website mitweb.co.uk I've a little house keeping to do which I feel is worth documenting The .htaccess file * here I want to achieve a couple of things > make sure any calls to the admin folder goes to a https version > direct any links in search engines to the new relevant pages Here's the code to be added that solves these problems ######################################## RewriteCond %{HTTPS} off RewriteRule ^(wp-admin/.*)$ https://www.mitweb.co.uk/$1 [R=301,L] Redirect 301 /home-heating-oil-devon-cornwall/ http://www.mitweb.co.uk/services/home-heating/ Redirect 301 /agricultural/ http://www.mitweb.co.uk/services/agricultural/ ######################################### ETC ETC Robot.txt I want to disallow robots ( search engine robots ) from the Admin area. ########################################## User-agent: * Disallow: /wp-admnin/

No comments: