mertskaplan/Travian-Unit-Advice-Simulator/master/.htaccess - Htaccess File

mertskaplan/Travian-Unit-Advice-Simulator/master/.htaccess

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} www.travianuas.tk [nc]
RewriteRule (.*) http://travianuas.tk/$1 [R=301,L,R]

ErrorDocument 404 /index.php

RewriteRule ^en?$ en/home [R=301]
RewriteRule ^de?$ de/home [R=301]
RewriteRule ^tr?$ tr/home [R=301]
RewriteRule ^home?$ en/home [R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)/(.*)/?$ $2.php?lang=$1&%{QUERY_STRING} [L]

RewriteCond %{THE_REQUEST} ^(GET|HEAD) /romans-advice.php?lang=([^& ]+)&?([^ ]*)
RewriteRule ^ /%2/romans-advice?%3 [L,R=301]

RewriteCond %{THE_REQUEST} ^(GET|HEAD) /gauls-advice.php?lang=([^& ]+)&?([^ ]*)
RewriteRule ^ /%2/gauls-advice?%3 [L,R=301]

RewriteCond %{THE_REQUEST} ^(GET|HEAD) /teutons-advice.php?lang=([^& ]+)&?([^ ]*)
RewriteRule ^ /%2/teutons-advice?%3 [L,R=301]

# Enable GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript image/svg+xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</ifmodule>

<ifmodule mod_expires.c>
  <filesmatch ".(ico|jpg|gif|png|svg|css|woff)$">
       ExpiresActive on
       ExpiresDefault "access plus 1 year"
   </filesmatch>
</ifmodule>

<ifmodule mod_headers.c>
  <filesmatch ".(ico|svg|jpg|png|gif|css|woff)$">
  Header set Cache-Control "max-age=2678400, public"
  </filesmatch>
</ifmodule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, GET, HTTP_HOST, no-gzip, QUERY_STRING, REQUEST_FILENAME, THE_REQUEST

Comments

Apache