hpcodecraft/faces/master/.htaccess - Htaccess File

hpcodecraft/faces/master/.htaccess

<Files .htaccess>
order allow,deny
deny from all
</Files>

Header unset ETag
FileETag none

<IfModule mod_expires.c>

ExpiresActive on
ExpiresDefault "access plus 14 days"

<FilesMatch ".(js|css)$">
ExpiresDefault "access plus 1 month"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</FilesMatch>

<FilesMatch ".(gif|jpg|jpeg|png)$">
ExpiresDefault "access plus 1 year"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</FilesMatch>

</IfModule>

# BEGIN Gzip
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript application/json
</IfModule>
# END Gzip

RewriteEngine On                                                      # Turn on the rewriting engine
RewriteBase /

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteRule ^maintenance$       index.php?page=maintenance    [NC,L]      # Handle maintenance page
RewriteRule ^/?$                index.php?page=main           [NC,L]      # Handle main page
RewriteRule ^([0-9]+)?$         index.php?page=single&sub=$1  [NC,L]      # Handle faces
RewriteRule ^tag/(.+)?$         index.php?page=tag&sub=$1     [NC,L]      # Handle tags
RewriteRule ^developer?$        index.php?page=developer      [NC,L]      # Handle developer page
RewriteRule ^imprint?$          index.php?page=imprint        [NC,L]      # Handle imprint page
RewriteRule ^copyright?$        index.php?page=copyright      [NC,L]      # Handle copyright page
RewriteRule ^submit?$           index.php?page=submit         [NC,L]      # Handle submission page
RewriteRule ^([0-9]+)/thumb.*$  index.php?page=thumb&sub=$1   [NC,L]      # Handle face thumbnails
RewriteRule ^([0-9]+)/full.*$   index.php?page=full&sub=$1    [NC,L]      # Handle face fullsizes
RewriteRule ^error.*$           index.php?page=error          [NC,L]      # Handle errors
RewriteRule ^feed.*$            index.php?page=feed           [NC,L]      # Handle feeds
RewriteRule ^ajax?$             index.php?page=ajax           [NC,L]      # Handle ajax calls
RewriteRule ^cookie?$           index.php?page=cookie         [NC,L]      # Handle cookie

RewriteRule ^api.(json|jsonp:.*|xml)/(.*)?$    index.php?page=api&format=$1&query=$2      [NC,L]      # Handle api

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, HTTPS

Comments

Apache