SnosMe/www/master/.htaccess
AddDefaultCharset UTF-8
DefaultLanguage ru-RU
Options -Indexes
ErrorDocument 403 /errors/403.php
ErrorDocument 404 /errors/404.php
ErrorDocument 500 /errors/500.php
RewriteEngine on
RewriteBase /
# Force the www
RewriteCond %{HTTP_HOST} ^snos.net [NC]
RewriteRule ^(.*)$ http://www.snos.net/$1 [L,R=301]
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteRule ^(.*)$ $1.php
#RewriteCond %{REQUEST_FILENAME}.html -f
#RewriteRule ^(.*)$ $1.html
RewriteRule ^news/([0-9]+).*$ /news.php?id=$1 [NC]
RewriteRule ^page/([0-9]+)$ /index.php?page=$1 [NC]
RewriteRule ^login /user/login.php [NC]
RewriteRule ^register /user/register.php [NC]
RewriteRule ^logout /user/logout.php [NC]
RewriteRule ^landing landing.php [NC]
RewriteRule ^settings/profile /user/settings_profile.php [NC]
RewriteRule ^user/avatar/(.*)$ /user/avatar.php?user=$1 [NC]
RewriteRule ^profiles/(.*)$ /user/profiles.php?user=$1 [NC]
Redirect /docs/ http://new.google.com/docs/
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 7 days"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access plus 14 day"
ExpiresByType text/html "access plus 1 month"
ExpiresByType text/php "access plus 7 day"
ExpiresByType application/javascript "access plus 14 day"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch ".(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
On Github License
Files
Download PDF of Htaccess file