Stuff that occurs to me

All of my 'how to' posts are tagged here. The most popular posts are about blocking and private accounts on Twitter, also the science communication jobs list. None of the science or medical information I might post to this blog should be taken as medical advice (I'm not medically trained).

Think of this blog as a sort of nursery for my half-baked ideas hence 'stuff that occurs to me'.

Contact: @JoBrodie Email: jo DOT brodie AT gmail DOT com

Science in London: The 2018/19 scientific society talks in London blog post

Showing posts with label redirect. Show all posts
Showing posts with label redirect. Show all posts

Tuesday, 17 November 2015

Worked example: redirecting some pages on the work website

Edit 18 November 2015: this worked



I am fiddling about with the work website - http://www.chi-med.ac.uk and we've moved some bits and pieces around so that the architecture makes sense.

Some of our older links of course now don't work but I still want them to as they're listed on other people's websies already and I want it to be easy / seamless without people having to update their URLs.

According to this website http://www.pa.msu.edu/services/computing/faq/auto-redirect.html I am to create a file in the relevant folder and call it .htacess and then add the line

Redirect  /path-of-file-to-be-redirected  URL-of-page-to-go-to

That's all very well if it's just one page but I have several, as follows.

Redirect /research/infusionpumps/index.php  http://www.chi-med.ac.uk/infusionpumps/index.php
Redirect /research/infusionpumps/architecture/index.php http://www.chi-med.ac.uk/tools/architecture.php
Redirect /research/infusionpumps/hazardanalysis/index.php http://www.chi-med.ac.uk/infusionpumps/hazardanalysis.php
Redirect /research/infusionpumps/hcihumanfactors/index.php http://www.chi-med.ac.uk/infusionpumps/humanfactors.php
Redirect /research/infusionpumps/modelbaseddesign/index.php http://www.chi-med.ac.uk/infusionpumps/modelbasedesign.php
Redirect /research/infusionpumps/verification/index.php http://www.chi-med.ac.uk/infusionpumps/verification.php
Redirect /research/infusionpumps/dataloggers/index.php http://www.chi-med.ac.uk/infusionpumps/dataloggersforensic.php

I don't know if I should add them all in the single .htaccess file, or make an individual file for each page and number them .htaccess1 etc (not even sure if that would work).

Going to find out though...

This is what I'm after






Tuesday, 10 November 2015

Memo to self on how to set up a page redirect on a website

Couldn't get the bit of HTML code that goes before and after another bit of HTML code, that you want to be visible without running as HTML code, to work on Blogger, so a screenshot will have to do. Here's the file with the text below in it for actual copying and pasting purposes. This is really just a blog post for me, to remind me how I did a small thing on the work website in case I want to do it again.

It works perfectly so if you've got neater ways of doing it... alas, I don't care :)
While we're at it, I can never remember where the local image folder is, it's here
C:\Jo Brodie QM\shared-local-site\images