Created
October 4, 2016 07:35
-
-
Save BulatSa/ea0bfe0473f4cecef024f894f128ea7c to your computer and use it in GitHub Desktop.
Убрать .html из урла сайта
This file contains hidden or 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
В .htaccess | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP | |
RewriteRule ^([^.]+)\.html$ http://site.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