.htaccess useful tricks
.htaccess useful tricks RewriteEngine on #RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]#RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{HTTPS} !onRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] #RewriteEngine On #RewriteCond %{HTTPS} !=on #RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] ErrorDocument 404 /index.php #RewriteCond %{REQUEST_FILENAME} !-f#RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}\.html -fRewriteRule ^(.*)$ $1.html RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}\.php -fRewriteRule ^(.*)$ $1.php
You must be logged in to post a comment.