Created
April 6, 2015 02:46
-
-
Save Kaiderella/5093fe213379c8d68337 to your computer and use it in GitHub Desktop.
Mẫu file .htaccess tối ưu nhất dành cho WordPress
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
<IfModule mod_headers.c> | |
<FilesMatch ".(js|css|xml|gz|html)$"> | |
Header append Vary: Accept-Encoding | |
Header set Connection keep-alive | |
</FilesMatch> | |
Header unset ETag | |
FileETag None | |
<ifmodule mod_expires.c> | |
<filesmatch ".(jpg|gif|jpeg|png|css|js)$"> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 year" | |
</filesmatch> | |
</ifmodule> | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment