back to top
shopping basket

View your basket

Medium format negative scanning service

What our customers are saying:

The service was fast & efficient, collected and delivered to our door! I will definitely use their service again.

Read more...

HTML 301 Re-directs

HTML 301 Re-directs

PiciScan Web Design Blog RSS Feed

Posted on: Thursday, 23 April 2015

In a previous blog post, I discussed how to create re-directs for PHP files. But, not all of your pages will be PHP files, nor will all of your errant inbound links. I STILL get Google's Webmaster Tools flagging 404 errors on pages that I deleted two or three years ago. And, some of these pages are HTML files.

Another use for HTML re-directs might be if you used to have HTML files making up your website, and have now moved to PHP files (perhaps because you have decided to follow my post on keeping the header and footer the same with PHP!). Any links around the internet pointing towards these HTML files would end in 404 errors unless you do something about it.

So, how to point these in the right direction?

Technically speaking, what you create in an HTML file is not a 301 re-direct, but a new, refreshed state for the page you have been directed towards. Whatver the technical term, the result is the same. The user of your website doesn't notice a thing. All they know is they've clicked on a link from some other place on the internet and ended up on your website on the expected page. This'll keep them happy, and you: whatever your intended conversion, it is far more likely to happen if they are not faced with a 404 error brick-wall.

Below is the code that you will need to use:

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<meta http-equiv="refresh" content="0; url=http://your-domain.com/new-page-title">
<meta name="robots" content="noindex">
</head>
<body>
</body>
</html>

You will need to alter it slightly, exchanging your-domain.com for the name of your own website and new-page-title for the appropriate destination page. DON'T FORGET to append the file extension as well - especially important if re-directing from an HTML version to a PHP version, or your browser could become quite confused.

Mark founded PiciScan in 2010, and sold it in October 2015 to Web By Numbers Ltd, who now employ him! He likes Star Wars, playing escape games and looking after his bonsai tree.

comments powered by Disqus

The Latest From our Scanning Blog

Christmas 2015

Christmas 2015

Posted: 14 December 2015

It’s nearly the time of year to be going up into the loft and bringing down all the Christmas decorations, locating the tree and seeing if those lights from last year still work, or if you need to buy any more...

Read more

The Latest From our Web Design Blog

Box Sizing: Border-Box

Box Sizing: Border-Box

Posted: 24 March 2016

I first came across box-sizing: border-box when it cropped up in a temporary colleague's CSS. I found it pretty annoying when I picked up work that he'd started as it seemed to get in the way. This was because, as I said in a previous post on margin ...

Read more