sebfabiani/vcv/master/.htaccess - Htaccess File

sebfabiani/vcv/master/.htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

#get rid of bad bots
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^BLP_bbot
RewriteRule ^(.*)$ http://go.away/

RewriteCond %{HTTP_USER_AGENT} ^BLP_bbot/0.1
RewriteRule ^(.*)$ http://go.away/

RewriteCond %{HTTP_USER_AGENT} ^MJ12bot
RewriteRule ^(.*)$ http://go.away/

RewriteCond %{HTTP_USER_AGENT} ^MJ12bot/v1.4.5
RewriteRule ^(.*)$ http://go.away/

</IfModule>

<files wp-config.php>
order allow,deny
deny from all
</files>

Options All -Indexes

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

# REDIRECTION
RedirectPermanent /logistique-urbain http://mind2web.alwaysdata.net/logistique-urbaine/

<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

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

# BEGIN FRESH-MINIFICATOR
### Headers gzip, expires
<IfModule mod_headers.c>
<filesMatch .*.(jpg|jpeg|png|gif|ico|js|css)(.gz)?$>
Header append Cache-Control "public"
Header append Expires "A604800"
</filesMatch>
Header unset Accept-Ranges
Header unset ETag
Header unset Link
Header unset Pragma
Header unset Transfer-Encoding
Header unset X-Pingback
Header append Vary Accept-Encoding
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [L]
<FilesMatch .*.gz$>
Header set Content-Encoding: gzip
</FilesMatch>
<FilesMatch .*.css.gz$>
ForceType text/css
</FilesMatch>
<FilesMatch .*.html?.gz$>
ForceType text/html
Header unset Expires
</FilesMatch>
<FilesMatch .*.js.gz$>
# Works in IE8 and older but obsolete - today standart = application/javascript
ForceType text/javascript
</FilesMatch>
<FilesMatch .*.xml.gz$>
ForceType text/xml
</FilesMatch>
<FilesMatch .*.txt.gz$>
ForceType text/plain
</FilesMatch>
</IfModule>
# END FRESH-MINIFICATOR

# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
</IfModule>
<FilesMatch ".(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header set Cache-Control "max-age=31536000, public"
         Header unset Set-Cookie
         Header set X-Powered-By "W3 Total Cache/0.9.4.1"
    </IfModule>
</FilesMatch>
<FilesMatch ".(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header set Cache-Control "max-age=3600, public"
         Header set X-Powered-By "W3 Total Cache/0.9.4.1"
    </IfModule>
</FilesMatch>
<FilesMatch ".(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|woff|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|WOFF|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    FileETag MTime Size
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header set Cache-Control "max-age=31536000, public"
         Header unset Set-Cookie
         Header set X-Powered-By "W3 Total Cache/0.9.4.1"
    </IfModule>
</FilesMatch>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} /$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
    RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
</IfModule>
# END W3TC Page Cache core
# END WordPress

On Github License

Files

Download PDF of Htaccess file
DEFLATE, DOCUMENT_ROOT, ENV, HTTP_COOKIE, HTTP_HOST, HTTP_USER_AGENT, POST, Pragma, QUERY_STRING, REQUEST_FILENAME, REQUEST_METHOD, REQUEST_URI, W3TC_ENC, W3TC_PREVIEW

Comments

Apache