Created
October 21, 2014 00:35
-
-
Save rolia17/49d7573a9ecc869dd994 to your computer and use it in GitHub Desktop.
Apache /page.html to /page rewrite rule
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
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP | |
RewriteRule ^([^.]+)\.html$ http://YOURSITE.ru/$1 [R=301,L] | |
RewriteCond %{REQUEST_URI} !(\.[^./]+)$ | |
RewriteCond %{REQUEST_fileNAME} !-d | |
RewriteCond %{REQUEST_fileNAME} !-f | |
RewriteRule (.*) /$1.html [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment