{"action":"created","issue":{"url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/1072","labels_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/1072/labels{/name}","comments_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/1072/comments","events_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/1072/events","html_url":"https://github.com/DaftMonk/generator-angular-fullstack/issues/1072","id":95474005,"number":1072,"title":"Help web crawlers look at pages","user":{"login":"wikett","id":3876214,"avatar_url":"https://avatars.githubusercontent.com/u/3876214?v=3","gravatar_id":"","url":"https://api.github.com/users/wikett","html_url":"https://github.com/wikett","followers_url":"https://api.github.com/users/wikett/followers","following_url":"https://api.github.com/users/wikett/following{/other_user}","gists_url":"https://api.github.com/users/wikett/gists{/gist_id}","starred_url":"https://api.github.com/users/wikett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wikett/subscriptions","organizations_url":"https://api.github.com/users/wikett/orgs","repos_url":"https://api.github.com/users/wikett/repos","events_url":"https://api.github.com/users/wikett/events{/privacy}","received_events_url":"https://api.github.com/users/wikett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-07-16T16:33:45Z","updated_at":"2015-07-22T15:18:13Z","closed_at":null,"body":"Hi there,\r\n\r\nI am trying to improve the SEO for my website following this article: http://www.michaelbromley.co.uk/blog/171/enable-rich-social-sharing-in-your-angularjs-app\r\n\r\nDoes someone know how can I use .htaccess in heroku? I have changed the .htaccess file from \\dist\\public folder adding this:\r\n```\r\n<ifModule mod_rewrite.c>\r\nRewriteEngine On\r\n\r\n# allow social media crawlers to work by redirecting them to a server-rendered static version on the page\r\nRewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet)\r\nRewriteRule album/(\\d*)$ http://www.otherdomain.comr/static-page.php?id=$1 [P]\r\n\r\n</ifModule>\r\n```\r\n\r\nbut doesn't work.\r\n\r\nAny suggestion?\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/comments/123755639","html_url":"https://github.com/DaftMonk/generator-angular-fullstack/issues/1072#issuecomment-123755639","issue_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/1072","id":123755639,"user":{"login":"glenn-coessens","id":11027453,"avatar_url":"https://avatars.githubusercontent.com/u/11027453?v=3","gravatar_id":"","url":"https://api.github.com/users/glenn-coessens","html_url":"https://github.com/glenn-coessens","followers_url":"https://api.github.com/users/glenn-coessens/followers","following_url":"https://api.github.com/users/glenn-coessens/following{/other_user}","gists_url":"https://api.github.com/users/glenn-coessens/gists{/gist_id}","starred_url":"https://api.github.com/users/glenn-coessens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenn-coessens/subscriptions","organizations_url":"https://api.github.com/users/glenn-coessens/orgs","repos_url":"https://api.github.com/users/glenn-coessens/repos","events_url":"https://api.github.com/users/glenn-coessens/events{/privacy}","received_events_url":"https://api.github.com/users/glenn-coessens/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T15:18:13Z","updated_at":"2015-07-22T15:18:13Z","body":"Never written any middleware before but i think this should work:\r\n\r\n// a middleware sub-stack which handles GET requests to /user/:id\r\nrouter.get('/', function (req, res, next) {\r\n  // if user agent is facebook\r\n  if (facebook) \r\n  {\r\n  next('route');\r\n} \r\n // else pass the control to the next middleware in this stack\r\n  else next(); //\r\n}, function (req, res, next) {\r\n  // render a regular page\r\n  res.render('regular');\r\n});\r\n\r\n// handler for /user/:id which renders a special page\r\napp.get('/user/:id', function (req, res, next) {\r\n  res.render('special');\r\n});"}}