Regular Expressions 101

Remove .html from url

Open Workspace
  • PCRE2 (PHP)
  • Substitution
0

Regular Expression

/
^(.+)\.html(.*)$
/

Description

I used in Nginx to rewrite the location from http://example.com/about.html to http://example.com/about

Submitted by Vijay Amirtha Raj J