rewrite is simply not working

Discussion in 'Nginx' started by rob_smnet, Oct 6, 2015.

  1. #1
    Hi,

    I have this in my config within a server section
    
    location ~ 71-preparing-for-university-and-placement\.html {
            return 301 https://mydomain.net/products/preparing-for-university-and-placement.4/;
    }
    
    Code (markup):
    Basically, if the url ends in 71-preparing-for-university-and-placement.html then I want to redirect but this is not being picked up at all - it's entirely ignored.

    Does anyone know what I've done wrong here?

    Thanks for your help.
     
    rob_smnet, Oct 6, 2015 IP