mod_rewrite in .htaccess

In the process of migrating the website I needed to catch old URLs and map them to the locations of the documents on the new website. Deploy a .htaccess file in the root of the website and introduce Redirect 301’s.

Simples…

Well for the static mappings yes.

e.g. 

Redirect 301 /2009/ /blog/

However to avoid having to implement lines for every single permutation mod_write allows to regex matching and re-writing.

Firstly it is neccessary to enable mod_rewrite which for me on Ubuntu means:

sudo a2enmod rewrite
sudo service apache2 restart

Don’t forget to insert ‘AllowOverride All’ in the ‘<Directory nn>’section. Then it is possible to add the following to the .htaccess file.

e.g. 

RewriteEngine on
RewriteRule ^20[01][0-9]/$ /blog/ [R=301]

In this case the important thing to remember is that the initial slash for the webpage is removed, so don’t match on ‘^/blah/$’ but instead ‘^blah/$’. This took a little while to figure out what was going on when I first implemented this. Also logging has changed since installed a web server from scratch, ‘RewriteLog’ has been depricated, you must now use ‘LogLevel alert rewrite:trace3’ or whichever level you require. Which can be applied to the ‘<Directory nn>’ section.

More details can be found on the apache website:

Posted in Apache, Hints and Tips | Comments Off on mod_rewrite in .htaccess

Pipe Drums – Awsome

Studying and spotted this on Youtube … it’s incredible this is all coming from this guy and his pipes !!

This is totally wicked …

.. and there are others.

Just Google ‘playing music with pipes’

Updated; this appears to be the guys homepage: https://pipeguy.bandcamp.com/

Posted in Music, Pipe Guy | Comments Off on Pipe Drums – Awsome

Limited Ed. Millenium Falcon

I wandered into the LEGO shop at Disney Springs and they’ve got a limited edition Millennium Falcon (LEGO part code 75192) for $799.99. It is like rocking horse droppings and considerably more expensive in the Uk. I asked one of the shop assistants about shipping to the Uk, they politely declined and suggested bringing it through as hand luggage … this box is absolutely massive!

And near the exit to the shop, in a glass display case, they have one built up … I think this is the largest LEGO kit I have found to date. I think the Deathstar (LEGO part code 75159) is smaller.

Too big for my collection but I can dream a little…

Updated 8th July 2018 – The local Lego store to me now has this for £649.99

Posted in Diary | Comments Off on Limited Ed. Millenium Falcon

Erwin Schodinger did/didn’t live here 1940 – 1956

I was taking a walk along a riverside path heading toward St Pancras in London and spotted this plaque.

I was definately there …

Posted in Diary | Comments Off on Erwin Schodinger did/didn’t live here 1940 – 1956

Keep the Bombe at Bletchley

An excellent crowfunded shout out to keep the Bombe on the Bletchley Park Estate. I have pledged a years membership of the TNMOC.

The link for pledging is as follows: https://www.crowdfunder.co.uk/new-display/

I visited TNMOC a few years ago. In addition to the Bombe, my favorate was the WITCH. It uses Dekatron values … which operate in base 10. It is cool to see it working, it’s like you can see it thinking. 

This video is a reboot of it on 20th Nov 2012.

Posted in Apple | Comments Off on Keep the Bombe at Bletchley

Open Source Intelligence: Resources for Searching and Analysing Online Information

After some complaints about the release of the sixth edition with little or no notice, I received a number of strong recommendations so purchased the book.

It is mostly reference material, I will updating this posting once I delve more deeply into the book.

Posted in Diary, Security | Comments Off on Open Source Intelligence: Resources for Searching and Analysing Online Information

Ready Player One

This book was recommended by a work colleague and it is an awsome read. It took me back on a nostalgic trip to my experiences with computers games in the 1980’s and on. For those who have been around a while it really catches the inner-geek. 

The book has now been made into a filmreleased 29th May 2018 and directed by Stephen Spielberg. I understand that it was problematic to get the rights to a number of the elements included in the book, but if anyone can fix this I’m sure Mr Spielberg can. I’m looking forward to seeing the film once it is released.

Posted in Diary | Comments Off on Ready Player One

Beyond Top Secret U

This is a facinating book, by Lt. Cmdr. Ewen Montagu who worked for British Inteligence during the second world war. He was involved in many covert activities notably;

The Double Cross System, where the British ran all the spies that the Germans sent to the Uk.
Operation Mincemeat, where a human cadaver carried false documents (and letters) was put into the sea near Spain. These documents succesfully convienced the Germans that an Alied attack would be made against Sardinia and Greece, instead of the real target Sicily. 

A film, ’The Man Who Never Was’, dramatised this operation. One notable change was made to the plot, was the way the Alies confirmed that Germany had taken the bate. In the film, an Irish spy was send to the UK, whereas in reality due to the Double Cross System, the Alies already knew.


Note: Cmdr. Montagu makes a cameo in the film …

Posted in Diary | Comments Off on Beyond Top Secret U

Mastering Bitcoin 2nd Edn

This book was recommended by a colleague, as I was looking to get a better understanding of the interactions with the Bitcoin blockchain. This book specifically as I have been advised that Andreas Antonopoulos ‘wrote the BIBLE for Bitcoin for the masses’. At this time I have skim read it, and as I’d hoped it is about the technical aspects of blockchain, and not another investment guide. I will update when I’ve had a chance to spend more time.

Posted in Diary | Comments Off on Mastering Bitcoin 2nd Edn

China may be using the sea to hide submarines

Who knew ?

Posted in Diary | Comments Off on China may be using the sea to hide submarines