Never mind I've worked it out Put this in the server block rewrite ^(/.*)\.htm(\?.*)?$ $1$2 permanent; Peteby PeteLong - Migration from Other Servers
Hi, Hopefully this is a simple one. I'm about to migrate form Apache to nginx, Ive got everything setup ok, apart form one thing; In Apache I have a rewrite (in .htaccess) that redirects any request for http://www.mysite.com/KB/Article/000001.htm to http://www.mysite.com/KB/Article/000001 (So it strips the .htm off the end) It's because the site was originally written in flat hby PeteLong - Migration from Other Servers
![]() |
![]() |
![]() |
![]() |
|