AngularJS SEO htaccess: redirect root domain to snapshot
问题 I use angular with html5 mode $routeProvider.otherwise({redirectTo : '/index' }); $locationProvider.html5Mode(true).hashPrefix('!'); and for that I have htaccess to handle google indexing # Rewrite anything with google appended string to english version of the snapshot RewriteCond %{QUERY_STRING} ^_escaped_fragment_= RewriteCond %{HTTP_HOST} ^touchtyping.guru [NC] RewriteRule ^ snapshots%{REQUEST_URI}-en.html [L] # Rewrite everything else to index.html to allow html5 state links RewriteRule ^