shql/AngularJS-Google-Bot-Test/master/app/.htaccess - Htaccess File

shql/AngularJS-Google-Bot-Test/master/app/.htaccess

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# RankJS integration
RewriteCond %{HTTP_USER_AGENT} .*googlebot.* [OR] [NC]
RewriteCond %{HTTP_USER_AGENT} .*bingbot.* [NC]
RewriteRule .* http://www.rankjs.com/crawler/htmlsnapshot?url=$1 [P]

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !/api

# otherwise forward it to index.html 
RewriteRule ^.*$ - [NC,L]
RewriteRule ^. index.html [NC,L]

On Github License

Files

Download PDF of Htaccess file
HTTP_USER_AGENT, REQUEST_FILENAME, REQUEST_URI

Comments

Apache