OmniHost/CoreCMS/master/.htaccess - Htaccess File

OmniHost/CoreCMS/master/.htaccess

# 1.To use  you need to be running apache with mod_rewrite enabled. 
Options +FollowSymlinks
# Prevent Directoy listing 
Options -Indexes

FileETag None

AddDefaultCharset utf-8

# SEO URL Settings
RewriteEngine On
# If your CoreCMS installation does not run on the main web folder make sure you folder it does run in ie. / becomes /cms/ 
RewriteBase /

#css / js compressors
RewriteRule ^view/(.*.css) cssjs.php?type=css&files=$1 [L]
RewriteRule ^view/(.*.js) cssjs.php?type=javascript&files=$1 [L]
RewriteRule ^admin/view/(.*.css) admin/cssjs.php?type=css&files=$1 [L]
RewriteRule ^admin/view/(.*.js) admin/cssjs.php?type=javascript&files=$1 [L]

RewriteRule ^admin/img/(.*)$ img/$1 [L,NC,R]

RewriteRule ^sitemap.xml$ index.php?p=feed/google_sitemap [L]
#reroute everything to the index file :-)
RewriteRule ^system/downloads/(.*) /index.php?p=error/not_found [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

#Force (http host) www to non www (optional)
#RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

#Force (https host) www to non www (optional)
#RewriteCond %{HTTPS} on
#RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
#RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

#Force (http host) non www to www (optional)
#RewriteCond %{HTTP_HOST} !^www.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

#Force (https host) non www to www (optional)
#RewriteCond %{HTTPS} on
#RewriteCond %{HTTP_HOST} !^www.
#RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

#headers and speed
<ifModule mod_headers.c>
  Header unset ETag
    Header set X-UA-Compatible "IE=edge"
    # `mod_headers` can't match based on the content-type, however, we only
    # want to send this header for HTML pages and not for the other resources
    <FilesMatch ".(appcache|crx|css|cur|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
        Header unset X-UA-Compatible
    </FilesMatch>
</IfModule>

<ifModule mod_headers.c>
    Header set Connection keep-alive
</ifModule>
<IfModule mod_expires.c>

    ExpiresActive on
    ExpiresDefault                                      "access plus 1 month"

  # CSS
    ExpiresByType text/css                              "access plus 1 year"

  # Data interchange
    ExpiresByType application/json                      "access plus 0 seconds"
    ExpiresByType application/xml                       "access plus 0 seconds"
    ExpiresByType text/xml                              "access plus 0 seconds"

  # Favicon (cannot be renamed!) and cursor images
    ExpiresByType image/x-icon                          "access plus 1 week"

  # HTML components (HTCs)
    ExpiresByType text/x-component                      "access plus 1 month"

  # HTML
    ExpiresByType text/html                             "access plus 0 seconds"

  # JavaScript
    ExpiresByType application/javascript                "access plus 1 year"

  # Manifest files
    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
    ExpiresByType text/cache-manifest                   "access plus 0 seconds"

  # Media
    ExpiresByType audio/ogg                             "access plus 1 month"
    ExpiresByType image/gif                             "access plus 1 month"
    ExpiresByType image/jpeg                            "access plus 1 month"
    ExpiresByType image/png                             "access plus 1 month"
    ExpiresByType video/mp4                             "access plus 1 month"
    ExpiresByType video/ogg                             "access plus 1 month"
    ExpiresByType video/webm                            "access plus 1 month"

  # Web feeds
    ExpiresByType application/atom+xml                  "access plus 1 hour"
    ExpiresByType application/rss+xml                   "access plus 1 hour"

  # Web fonts
    ExpiresByType application/font-woff                 "access plus 1 month"
    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
    ExpiresByType application/x-font-ttf                "access plus 1 month"
    ExpiresByType font/opentype                         "access plus 1 month"
    ExpiresByType image/svg+xml                         "access plus 1 month"

</IfModule>

### Additional Settings that may need to be enabled for some servers 
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 2. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 3. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 4. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 5. disable open_basedir limitations
# php_admin_value open_basedir none

#ANTI SPAM
#custom
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*trafficmonetize.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*free-social-buttons.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*event-tracking.com [NC,OR]

#from http://ads-blocker.com/block-referral-spam/
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*semalt.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Darodar.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Priceg.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*7makemoneyonline.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Buttons-for-website.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Ilovevitaly.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Blackhatworth.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Econom.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Iskalko.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Lomb.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Lombia.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*hulfingtonpost.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*cenoval.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*o-o-6-o-o.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*humanorightswatch.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*simple-share-buttons.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*sharebutton.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*s.click.aliexpress.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*social-buttons.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*anticrawler.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*site12.social-buttons.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*adcash.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*adviceforum.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*anticrawler.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*blackhatworth.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*cenokos.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*cityadspix.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*edakgfvwql.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*gobongo.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*iskalko.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*kambasoft.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*luxup.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*myftpupload.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*prodvigator.ua [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*resellerclub.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*savetubevideo.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*screentoolkit.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*seoexperimenty.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*slftsdybbg.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*socialseet.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*superiends.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*vodkoved.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*websocial.me [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*ykecwqlixx.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*76brighton.co.uk [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*paparazzistudios.com.au [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*powitania.pl [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*sharebutton.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*tasteidea.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*descargar-musica-gratis.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*torontoplumbinggroup.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*cyprusbuyproperties.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*4webmasters.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*ranksonic.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*best-seo-solution.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*get-free-traffic-now.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*googlsucks.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Buttons-for-your-website.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*Best-seo-offer.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*offers.bycontext.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*www1.social-buttons.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*website-errors-scanner.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*free-share-buttons.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*theguardlan.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*buy-cheap-online.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*netvibes.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*guardlink.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*securesuite.co.uk [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*securesuite.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*sitevaluation.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?://([^.]+.)*forum20.smailik.org [NC]
RewriteRule .* - [F]

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTP_REFERER, HTTPS, REQUEST_FILENAME, REQUEST_URI

Comments

Apache