Damn, it’s been ages since i’ve posted. This is a tiny one that is simple yet very useful.
I have a Napkee site that consists of a bunch of html files linked together. This was naturally created from a set of Balsamiq screens. Within these Balsamiq screens was a screen called ‘Homepage’ (not index, because that would have been machine friendly but user unfriendly). So, on Napkee export, no index.html file had been created, which is just messy when sending out links to the Napkee screens because i didn’t want to include Homepage.html in the link.
I wanted to redirect all requests for http://www.website.com/napkee_mockup to http://www.website.com/napkee_mockup/Homepage.html
- [Bad] An error page: Not an option so i’ll say no more about it.
- [Bad] A Meta Refresh, where the following code is added to the Meta tags within the file Head. Again this was not an option as it gives the redirect task to the end user’s browser.
<META HTTP-EQUIV=”refresh” content=”0;URL=http://www.new.com/new.htm”>
<META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW”>
- [Good] .htaccess redirect: This is the only correct way to do it.
add the following:
redirect 301 /napkee_mockup/index.html http://website.com/napkee_mockup/Homepage.html
I hope this helps a little.
There’s more good reading at http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm