Skip to content

Instantly share code, notes, and snippets.

@Remigr
Created December 14, 2015 15:22
Show Gist options
  • Save Remigr/addffd482d1f99684dd1 to your computer and use it in GitHub Desktop.
Save Remigr/addffd482d1f99684dd1 to your computer and use it in GitHub Desktop.
My .htaccess for angular SEO with snapshots
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteCond %{HTTP_USER_AGENT} baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest [NC,OR]
RewriteCond %{QUERY_STRING} _escaped_fragment_
RewriteRule ^(.*)$ snapshots%{REQUEST_URI}? [NC,L]
RewriteRule ^ index.php [QSA,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment