Map old website URLs to new case Insensitive

Written by James McDonald

September 10, 2015

Instead of just using RedirectPermanent in htaccess try:

RedirectMatch 301 (?i)/blog/my-really-cool-blog-post /about-us/blog/my-really-cool-blog-post

So if your old web server had capitalised URLs e.g.

http://www.example.com/blog/My-really-Cool-blog-post it will still redirect properly.

So to see if you have this problem look in your apache access.log file and look for 404s. This will give you a list of all incoming request that aren’t being found.

e.g.

cat /var/log/apache2/access.log | grep -E '\s404\s'

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...