Please provide me how to make a redirect in Magento if we add at the end of url trailing slash

http://example.com/blog.html/ to http://example.com/blog.html

Thank you.


I think you should be able to do it with a htaccess rewrite rule (assuming you are using apache instead of nginx on the server)

Something like this should do the trick

RewriteEngine On
RewriteRule ^(.*)\.html//$ $1.html [L]


I'm not an expert with nginx configurations however i had a quick search and came up with some information.

Something like the below in your nginx config

server {
    rewrite ^(/.html\//)\$ $1.html last;
| improve this answer | |
  • Unfortunately I have nginx server, so what can we do here? – O.Petrov Aug 12 '16 at 10:24
  • Updated my answer, hope it helps but i'm not an expert with nginx setup (yet) – DanCarlyon Aug 12 '16 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.