Clean URLs seem pretty simple but I'm in need of a special situation. I would like to be able to include the .html suffix or nothing at all but not any other extension:
someurl = pass someurl/somepage = pass someurl.html = pass someurl/somepage.html = pass someurl.css = fail someurl.exe = fail someurl.anyotherextension = fail someurl/someother.ext = fail
Is this possible? Would I have to somehow exclude the extensions I don't want?
Edit:
None of the answers so far seem to work. The only thing that I've discovered on my own that works is:
^/([\w]*(.html)?)$but it will not work with slashes in the url. Adding a slash inside the character class brackets makes it fail.