xxxxxxxxxx
RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
xxxxxxxxxx
# Remove last occurrence of any extension from the supplied file path
echo filename.ext | sed 's/\.[^.]*$//'
# Example
$ echo multi.period.filename.ext | sed 's/\.[^.]*$//'
multi.period.filename
# Remove the filename leaving only the extension
echo multi.period.filename.ext | sed -r 's/^.*\.//'
# Example
echo multi.period.filename.ext | sed -r 's/^.*\.//'
ext
xxxxxxxxxx
$ bfg --delete-folders .git --delete-files .git --no-blob-protection my-repo.git