goncaloneves/angular-about/master/src/.htaccess - Htaccess File

goncaloneves/angular-about/master/src/.htaccess

<IfModule mod_headers.c>
  RequestHeader set X-Prerender-Token "C9M5st7q3Ed8GYjsdpYZ"
</IfModule>

Options +FollowSymLinks

<IfModule mod_rewrite.c>
  RewriteEngine On

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

  <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://www.goncaloneves.com/$2 [P,L]
  </IfModule>

  # Don't rewrite files or directories
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Rewrite everything else to index.html to allow html5 state links
  RewriteRule ^ index.html [L]

</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTP_USER_AGENT, QUERY_STRING, REQUEST_FILENAME

Comments

Apache