jiin/Puffi/master/.htaccess - Htaccess File

jiin/Puffi/master/.htaccess

RewriteEngine on

RewriteBase /dev/Puffi/

# experimental
#<IfModule mod_headers.c>
#    RequestHeader set X-Prerender-Token "3Td3KOZYO07UvsUSQzpx"
#</IfModule>
 
<IfModule mod_rewrite.c>
    RewriteEngine On
 
    <IfModule mod_proxy_http.c>
        RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot [NC,OR]
        RewriteCond %{QUERY_STRING} _escaped_fragment_
        
        # Only proxy the request to Prerender if it's a request for HTML
        RewriteRule ^(?!.*?(.js|.css|.xml|.less|.png|.jpg|.jpeg|.gif|.pdf|.doc|.txt|.ico|.rss|.zip|.mp3|.rar|.exe|.wmv|.doc|.avi|.ppt|.mpg|.mpeg|.tif|.wav|.mov|.psd|.ai|.xls|.mp4|.m4a|.swf|.dat|.dmg|.iso|.flv|.m4v|.torrent))(.*) http://service.prerender.io/http://neribarnini.me/$2 [P,L]
    </IfModule>
</IfModule>

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) index.html [NC,L]

On Github License

Files

Download PDF of Htaccess file
HTTP_USER_AGENT, QUERY_STRING, REQUEST_FILENAME

Comments

Apache