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. 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.


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


Submit a Comment

Your email address will not be published.

You May Also Like…


Zebra Printer Language The above website has a page where you can enter ZPL and it...