{"id":4377,"date":"2012-09-19T12:00:04","date_gmt":"2012-09-19T11:00:04","guid":{"rendered":"http:\/\/www.markwilson.co.uk\/blog\/?p=4377"},"modified":"2012-09-19T00:33:48","modified_gmt":"2012-09-18T23:33:48","slug":"reducing-website-errors-http-301-redirects","status":"publish","type":"post","link":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm","title":{"rendered":"Reducing website errors with HTTP 301 redirects"},"content":{"rendered":"<p>A couple of weeks ago, <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/redirection-an-essential-plug-in-for-wordpress-users.htm\">I wrote about a WordPress plugin called Redirection<\/a>. I mentioned that I&#8217;ve been using this to highlight HTTP 404 errors on my site but I&#8217;ve also been using the crawl errors logged by Google&#8217;s Webmaster Tools to track down a number of issues resulting from the various changes that have been made to the site over the \u00a0years, then creating HTTP 301 redirects to patch them.<\/p>\n<h3>Redirections as a result of other people&#8217;s mistakes<\/h3>\n<p>One thing that struck me was how other people&#8217;s content can affect my site &#8211; for example, many forums seem to abbreviate long URLs with &#8230; in the middle. That&#8217;s fine until the HTML anchor gets lost (e.g. in a cut\/paste operation) and so I was seeing 404 errors from incomplete URLs like https:\/\/www.markwilson.co.uk\/blog\/2008\/12\/netboo&#8230;-file-systems.htm. These were relatively easy for me to track down and create a redirect to the correct target.<\/p>\n<p>Unfortunately, there is still one inbound link that includes an errant apostrophe that I&#8217;ve not been able to trap &#8211; <a href=\"http:\/\/wordpress.stackexchange.com\/questions\/43841\/allow-single-quote-in-urls\">even using %27<\/a> in the redirect rule seems to fail. I guess that one will just have to remain.<\/p>\n<h3>Locating Post IDs<\/h3>\n<p>Some 404s needed a little more detective work &#8211; for example\u00a0https:\/\/www.markwilson.co.uk\/blog\/2012\/05\/3899.htm is a post where I forgot to add a title before publishing and, even though I updated the WordPress slug afterwards, someone is linking to the old URL. \u00a0I used PHPMyAdmin to search for post ID 3899 in the wp_content table of the database, from which I could identify the post and \u00a0create a redirect.<\/p>\n<h3>Pattern matching with regular expressions<\/h3>\n<p>Many of the 404s were being generated based on old URL structures from either the Blogger version of this site (<a href=\"https:\/\/www.markwilson.co.uk\/blog\/2007\/03\/bye-bye-blogger-hello-wordpress.htm\">which I left behind several years ago<\/a>) or changes in the WordPress configuration (mostly after <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2011\/10\/rebuilding-my-site-please-excuse-the-appearance.htm\">last year&#8217;s website crash<\/a>). For these I needed to do some pattern matching, which meant an encounter with regular expressions, which I find immensely powerful, fascinating and intimidating all at once.<\/p>\n<p>Many of my tags were invalid as, at some point I obviously changed the tags from \/blog\/tags\/tagname to \/blog\/tag\/tagname\u00a0but I also had a hierarchy of tags in the past (possibly when I was still mis-using categories) which was creating some invalid URLs (like https:\/\/www.markwilson.co.uk\/blog\/tag\/apple\/ipad). \u00a0The hierachy had to be dealt with on a case by case basis, but the RegEx for dealing with the change in URL for the tags was fairly simple:<\/p>\n<ul>\n<li>Source RegEx: <code>(\\\/tags\\\/)<\/code><\/li>\n<li>Target RegEx:\u00a0<code>(\\\/tag\\\/)<\/code><\/li>\n<\/ul>\n<p>Using the <a href=\"http:\/\/rubular.com\/\">Rubular<\/a> Ruby RegEx Editor (thanks to <a href=\"http:\/\/twitter.com\/kristianbrimble\">Kristian Brimble<\/a> for the suggestion &#8211; there were other tools suggested but this was one I could actually understand), I was able to test the RegEx on an example URL and, once I was happy with it, that was another redirection created. \u00a0Similarly, I redirected\u00a0<code>(\\\/category\\\/)<\/code> to\u00a0<code>(\\\/topic\\\/)<\/code>.<\/p>\n<p>I also created a redirection for legacy .html extensions, rewriting them to .htm:<\/p>\n<ul>\n<li>Source RegEx: <code>(.*).html<\/code><\/li>\n<li>Target \u00a0RegEx:\u00a0<code>$1.htm<\/code><\/li>\n<\/ul>\n<p>Unfortunately, my use of a &#8220;greedy&#8221; wildcard meant this also sustituted html in the middle of a URL (e.g. https:\/\/www.markwilson.co.uk\/blog\/2008\/09\/creating-html-signatures-in-apple-mail.htm\u00a0became https:\/\/www.markwilson.co.uk\/blog\/2008\/09\/creating-.htm-signatures-in-apple-mail.htm) , so I edited the source RegEx to\u00a0<code>(.*).html$<\/code>.<\/p>\n<p>More complex regular expressions<\/p>\n<p>The trickiest pattern I needed to match was for archive pages using the old Blogger structure. \u00a0For this, I needed some help, so I reached out to Twitter:<\/p>\n<p>[blackbirdpie url=&#8221;http:\/\/twitter.com\/markwilsonit\/statuses\/248094926657712129&#8243;]<\/p>\n<p>and was very grateful to receive some responses, including one from <a href=\"http:\/\/twitter.com\/dan_delaney\">Dan Delaney<\/a>\u00a0that let me to create this rule:<\/p>\n<p>Source RegEx:\u00a0<code>\/blog\\\/([a-zA-Z\\\/]+)([\\d]+)(\\D)(\\d+)(\\w.+)<\/code><br \/>\nTarget RegEx:\u00a0<code>\/blog\/$2\/$4\/<\/code><\/p>\n<p>Dan&#8217;s example helped me to understand a bit more about how match groups are used, taking the second and fourth matches here to use in the target, but I later found <a href=\"http:\/\/net.tutsplus.com\/tutorials\/other\/8-regular-expressions-you-should-know\/\">a\u00a0tutorial\u00a0that might help<\/a> (most RegEx tuturials are quite difficult to follow but this one is very well illustrated).<\/p>\n<h3>A never-ending task<\/h3>\n<p>It&#8217;s an ongoing task &#8211; the presensce of failing inbound links due to incorrect URLs means that I&#8217;ll have to keep an eye on Google&#8217;s crawl errors but, over time, I should see the number of 404s drop on my site. That in itself won&#8217;t improve my search placement but it will help to signpost users who would otherwise have been turned away &#8211; and every little bit of traffic helps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A couple of weeks ago, I wrote about a WordPress plugin called Redirection. I mentioned that I&#8217;ve been using this to highlight HTTP 404 errors on my site but I&#8217;ve also been using the crawl errors logged by Google&#8217;s Webmaster Tools to track down a number of issues resulting from the various changes that have &hellip; <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Reducing website errors with HTTP 301 redirects<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[218],"tags":[56,473,29,15],"class_list":["post-4377","post","type-post","status-publish","format-standard","hentry","category-technology","tag-blogging","tag-regex","tag-website-development","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reducing website errors with HTTP 301 redirects - markwilson.it<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reducing website errors with HTTP 301 redirects - markwilson.it\" \/>\n<meta property=\"og:description\" content=\"A couple of weeks ago, I wrote about a WordPress plugin called Redirection. I mentioned that I&#8217;ve been using this to highlight HTTP 404 errors on my site but I&#8217;ve also been using the crawl errors logged by Google&#8217;s Webmaster Tools to track down a number of issues resulting from the various changes that have &hellip; Continue reading Reducing website errors with HTTP 301 redirects\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm\" \/>\n<meta property=\"og:site_name\" content=\"markwilson.it\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-19T11:00:04+00:00\" \/>\n<meta name=\"author\" content=\"Mark Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:site\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm\"},\"author\":{\"name\":\"Mark Wilson\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"headline\":\"Reducing website errors with HTTP 301 redirects\",\"datePublished\":\"2012-09-19T11:00:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm\"},\"wordCount\":754,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"keywords\":[\"Blogging\",\"Regular Expressions\",\"Website Development\",\"WordPress\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm\",\"name\":\"Reducing website errors with HTTP 301 redirects - markwilson.it\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\"},\"datePublished\":\"2012-09-19T11:00:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2012\\\/09\\\/reducing-website-errors-http-301-redirects.htm#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reducing website errors with HTTP 301 redirects\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/\",\"name\":\"markwilson.it\",\"description\":\"get-info -class technology | write-output &gt; \\\/dev\\\/web\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\",\"name\":\"Mark Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"width\":800,\"height\":800,\"caption\":\"Mark Wilson\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\"},\"description\":\"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.\",\"sameAs\":[\"http:\\\/\\\/www.markwilson.co.uk\\\/\",\"https:\\\/\\\/www.instagram.com\\\/markwilsonuk\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/markawilson\\\/\",\"https:\\\/\\\/x.com\\\/markwilsonit\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCWHlZCoHRTocdvtrOJ2IL4A\"],\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/author\\\/mark-wilson\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reducing website errors with HTTP 301 redirects - markwilson.it","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm","og_locale":"en_GB","og_type":"article","og_title":"Reducing website errors with HTTP 301 redirects - markwilson.it","og_description":"A couple of weeks ago, I wrote about a WordPress plugin called Redirection. I mentioned that I&#8217;ve been using this to highlight HTTP 404 errors on my site but I&#8217;ve also been using the crawl errors logged by Google&#8217;s Webmaster Tools to track down a number of issues resulting from the various changes that have &hellip; Continue reading Reducing website errors with HTTP 301 redirects","og_url":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm","og_site_name":"markwilson.it","article_published_time":"2012-09-19T11:00:04+00:00","author":"Mark Wilson","twitter_card":"summary_large_image","twitter_creator":"@markwilsonit","twitter_site":"@markwilsonit","twitter_misc":{"Written by":"Mark Wilson","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm#article","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm"},"author":{"name":"Mark Wilson","@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"headline":"Reducing website errors with HTTP 301 redirects","datePublished":"2012-09-19T11:00:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm"},"wordCount":754,"commentCount":1,"publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"keywords":["Blogging","Regular Expressions","Website Development","WordPress"],"articleSection":["Technology"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm","url":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm","name":"Reducing website errors with HTTP 301 redirects - markwilson.it","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#website"},"datePublished":"2012-09-19T11:00:04+00:00","breadcrumb":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/reducing-website-errors-http-301-redirects.htm#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.markwilson.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Reducing website errors with HTTP 301 redirects"}]},{"@type":"WebSite","@id":"https:\/\/www.markwilson.co.uk\/blog\/#website","url":"https:\/\/www.markwilson.co.uk\/blog\/","name":"markwilson.it","description":"get-info -class technology | write-output &gt; \/dev\/web","publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.markwilson.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468","name":"Mark Wilson","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","url":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","width":800,"height":800,"caption":"Mark Wilson"},"logo":{"@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1"},"description":"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.","sameAs":["http:\/\/www.markwilson.co.uk\/","https:\/\/www.instagram.com\/markwilsonuk\/","https:\/\/www.linkedin.com\/in\/markawilson\/","https:\/\/x.com\/markwilsonit","https:\/\/www.youtube.com\/channel\/UCWHlZCoHRTocdvtrOJ2IL4A"],"url":"https:\/\/www.markwilson.co.uk\/blog\/author\/mark-wilson"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":148,"url":"https:\/\/www.markwilson.co.uk\/blog\/2004\/12\/redirecting-clients-when-websites.htm","url_meta":{"origin":4377,"position":0},"title":"Redirecting clients when websites change","author":"Mark Wilson","date":"Wednesday 8 December 2004","format":false,"excerpt":"Whilst looking at the website statistics for my main website, I realised that many users were attempting to access pages that no longer exist on the server. Some may argue that old content should be left in place, but others will disagree and my preferred approach is to redirect requests\u2026","rel":"","context":"In \"Apache\"","block_context":{"text":"Apache","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/apache"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":257,"url":"https:\/\/www.markwilson.co.uk\/blog\/2004\/12\/implementing-custom-error-pages-for.htm","url_meta":{"origin":4377,"position":1},"title":"Implementing custom error pages for a website","author":"Mark Wilson","date":"Wednesday 8 December 2004","format":false,"excerpt":"One of the features used in my website is custom error pages, which allow errors to be handled using a format that matches other documents on the site. Apache users can configure custom error messages using .htaccess. Once pages have been created for an error message, include a directive in\u2026","rel":"","context":"In \"Apache\"","block_context":{"text":"Apache","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/apache"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4324,"url":"https:\/\/www.markwilson.co.uk\/blog\/2012\/09\/redirection-an-essential-plug-in-for-wordpress-users.htm","url_meta":{"origin":4377,"position":2},"title":"Redirection &#8211; an essential plug-in for WordPress users","author":"Mark Wilson","date":"Wednesday 5 September 2012","format":false,"excerpt":"Last year, a combination of a loss of service from my hosting provider and my appalling backups meant that this website was temporarily wiped off the face of the Internet. It's never recovered - at least not in terms of revenue - and it taught me an important lesson about\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":716,"url":"https:\/\/www.markwilson.co.uk\/blog\/2007\/02\/the-search-engine-friendly-way-to-merge-domains.htm","url_meta":{"origin":4377,"position":3},"title":"The search engine friendly way to merge domains","author":"Mark Wilson","date":"Tuesday 27 February 2007","format":false,"excerpt":"In common with many website owners, I have multiple domain names pointing at a single website (markwilson.co.uk, markwilson.me.uk and markwilson.it). There's nothing wrong with that (it's often used to present localised content or to protect a trademark) but certain search engines will penalise sites where it appears that multiple URLs\u2026","rel":"","context":"In \"Domain Names\"","block_context":{"text":"Domain Names","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/domain-names"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3259,"url":"https:\/\/www.markwilson.co.uk\/blog\/2011\/11\/handy-wordpress-url-re-write.htm","url_meta":{"origin":4377,"position":4},"title":"Handy WordPress URL re-write","author":"Mark Wilson","date":"Thursday 17 November 2011","format":false,"excerpt":"Last week, I accidentally advertised a blog post using two different URLs (I edited the title, which changed the WordPress slug, but forgot to edit a draft email to refer the new URL). With Twitter advertising one URL to potential customers, and our internal newsletter\u00a0advertising\u00a0another, I needed both to work.\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1356,"url":"https:\/\/www.markwilson.co.uk\/blog\/2009\/02\/i-got-burned-by-google-feedburner.htm","url_meta":{"origin":4377,"position":5},"title":"I got burned by [Google] FeedBurner","author":"Mark Wilson","date":"Sunday 1 February 2009","format":false,"excerpt":"On Friday night I wrote a post which optimistically suggested that I'd successfully migrated this site's RSS feeds from FeedBurner to the new Google FeedBurner platform. Unfortunately many people won't have seen that post (at least not until after I spent a good chunk of my weekend enlisting the support\u2026","rel":"","context":"In \"Google\"","block_context":{"text":"Google","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/google"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/4377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=4377"}],"version-history":[{"count":5,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/4377\/revisions"}],"predecessor-version":[{"id":4381,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/4377\/revisions\/4381"}],"wp:attachment":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=4377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=4377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=4377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}