Created
November 12, 2020 07:42
-
-
Save nstone101/85c205406649b67b650b608518b5f11c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## remove domain extension remove .html remove .php remove last extension .htaccess file | |
## Redirects example.com/cool-page.html to example.com/cool-page | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.html -f | |
RewriteCond %{REQUEST_URI} ^(.+)\.html$ | |
RewriteRule (.*)\.html$ /$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment