JimTR/yoursite/master/.htaccess - Htaccess File

JimTR/yoursite/master/.htaccess

# This turns on mod_rewrite and redirects any paths that don't physically exist
# to /index.php. You can then access that path info (to determine what to do) in
# PHP using $_SERVER['REQUEST_URI'] and $_SERVER['REDIRECT_URL']. This is an easy
# way to avoid having hundreds of rewrite rules slowing down Apache and making things
# more complicated than they should be.
#don't forget to un comment !
# Note: If you're having trouble making Apache pickup your .htaccess file,
# make sure AllowOverride is set to "All" instead of "None".

# RewriteEngine On
# RewriteBase /
<IfModule mod_headers.c>
# WEEK
<FilesMatch ".(jpg|jpeg|png|gif|swf|js|css)$">
    Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/opentype

# For Olders Browsers Which Can't Handle Compression
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>
# RewriteCond %{REQUEST_FILENAME} !-f # If not a file...
# RewriteCond %{REQUEST_FILENAME} !-d # and not a directory...
# RewriteRule . /index.php [L]        # serve index.php
RewriteEngine On 
RewriteCond %{HTTPS} off
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} shop 
RewriteRule ^(.*)$ https://kbracing.eu/$1 [R,L]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (shop/) 
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, HTTPS, no-gzip, REDIRECT_URL, REQUEST_FILENAME, REQUEST_URI, SERVER_PORT

Comments

Apache