RegEx for removing .html from urls
-
Hi!
I want to retire a plugin on a client site that appended .html to the site urls (thus keeping original pagenames from an old site). I have almost 700 pages and all that will change is the .html should be replaced with a / (/about.html becomes /about/).You provide the RegEx in your help:
Redirect .html pages in a directory: Source: /blog/(.*?)\.html Target: /$1/ Example: http://oldsite.com/blog/post-name.html => https://newsite.com/post-name/
How would I amend it to accomplish the following:
https://currentsite.com/post-name.html => https:currentsite.com/post-name/
Would it be:
Source: /(.*?)\.html Target: /$1/
THANKS!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘RegEx for removing .html from urls’ is closed to new replies.