I am trying to set up a very simple redirect which for some reason I just cannot get working. After a complete overhaul of the website, the new About page has the url /about-us/ whereas the old site was /aboutus/ . As google is still indexing the old url I wanted to set up a redirect from /aboutus/ to /about-us/ but nothing is working. I will need to set up a few of these rules pointing the old indexed pages to pages on the new website.
I have tried the following redirect rules:
This is due to a "feature" of apache .htaccess files, in which the prefix of the path to the containing directory of the .htaccess file is stripped from paths. In the case of the main .htaccess file, this means that the initial / is removed. That's why JonoM's paths lack the /.
My practice was to write paths, which are regexes, like so: ^/?foo-bar — this makes them portable between .htaccess and the main server configuration.