Created
June 8, 2014 21:21
-
-
Save tobikris/d947e8ca63e64007d4f7 to your computer and use it in GitHub Desktop.
.htaccess Examples
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
AddDefaultCharset utf-8 |
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
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Expires "Mon, 1 Jan 2010 01:00:00 GMT" |
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
RewriteEngine On | |
RewriteBase /service | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^\ ]+)\.php | |
RewriteRule ^/?(.*)\.php$ $1 [L,R=307,QSA] | |
RewriteCond %{REQUEST_FILENAME}.php -f | |
RewriteRule ^(.*)$ $1.php [L,QSA] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment