{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/comments/34557549","id":34557549,"diff_hunk":"@@ -46,13 +46,13 @@ app.get('/survey', function(req, res) {\n app.get(/^\\/ig\\//, function(req, res) {\n \tres.redirect(301, 'http://ig.ft.com/' + req.path.replace(/^\\/ig\\//, ''));\n });\n+app.get(/^(?:\\/intl)?\\/fastft(?:\\?post=[0-9]+)?(?:\\/([0-9]+))?(?:$|\\/)/, require('./server/controllers/fastft'));","path":"app.js","position":4,"original_position":4,"commit_id":"22fbe96ba85bd013d9dbe890af17f1a0571dc31f","original_commit_id":"22fbe96ba85bd013d9dbe890af17f1a0571dc31f","user":{"login":"matthew-andrews","id":825088,"avatar_url":"https://avatars.githubusercontent.com/u/825088?v=3","gravatar_id":"","url":"https://api.github.com/users/matthew-andrews","html_url":"https://github.com/matthew-andrews","followers_url":"https://api.github.com/users/matthew-andrews/followers","following_url":"https://api.github.com/users/matthew-andrews/following{/other_user}","gists_url":"https://api.github.com/users/matthew-andrews/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-andrews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-andrews/subscriptions","organizations_url":"https://api.github.com/users/matthew-andrews/orgs","repos_url":"https://api.github.com/users/matthew-andrews/repos","events_url":"https://api.github.com/users/matthew-andrews/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-andrews/received_events","type":"User","site_admin":false},"body":"i think the `(?:\\?post=[0-9]+)?` bit is actually not used/necessary…  i think express only looks at the path here minus the query string.\r\n\r\ntry with `/^(?:\\/intl)?\\/fastft(?:\\/([0-9]+))?(?:$|\\/)/` and the tests pass :grinning: ","created_at":"2015-07-14T11:13:08Z","updated_at":"2015-07-14T11:13:08Z","html_url":"https://github.com/Financial-Times/next-redirector/pull/47#discussion_r34557549","pull_request_url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/comments/34557549"},"html":{"href":"https://github.com/Financial-Times/next-redirector/pull/47#discussion_r34557549"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47","id":39826693,"html_url":"https://github.com/Financial-Times/next-redirector/pull/47","diff_url":"https://github.com/Financial-Times/next-redirector/pull/47.diff","patch_url":"https://github.com/Financial-Times/next-redirector/pull/47.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues/47","number":47,"state":"open","locked":false,"title":"change redirect to recognise fastft?post= as a fastft article","user":{"login":"andygnewman","id":8938227,"avatar_url":"https://avatars.githubusercontent.com/u/8938227?v=3","gravatar_id":"","url":"https://api.github.com/users/andygnewman","html_url":"https://github.com/andygnewman","followers_url":"https://api.github.com/users/andygnewman/followers","following_url":"https://api.github.com/users/andygnewman/following{/other_user}","gists_url":"https://api.github.com/users/andygnewman/gists{/gist_id}","starred_url":"https://api.github.com/users/andygnewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andygnewman/subscriptions","organizations_url":"https://api.github.com/users/andygnewman/orgs","repos_url":"https://api.github.com/users/andygnewman/repos","events_url":"https://api.github.com/users/andygnewman/events{/privacy}","received_events_url":"https://api.github.com/users/andygnewman/received_events","type":"User","site_admin":false},"body":"@matthew-andrews have changed the regex matcher to check for ?post= as well and moved the app.get for this above the smart-mapping to ensure it takes precedence.\r\n\r\nadded unit test for this.","created_at":"2015-07-13T15:53:03Z","updated_at":"2015-07-14T11:13:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"590c0275bb5fb8553395c6c7ce4051bdc695b277","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues/47/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-redirector/statuses/22fbe96ba85bd013d9dbe890af17f1a0571dc31f","head":{"label":"Financial-Times:bug/fastft-redirect","ref":"bug/fastft-redirect","sha":"22fbe96ba85bd013d9dbe890af17f1a0571dc31f","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":27079929,"name":"next-redirector","full_name":"Financial-Times/next-redirector","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-redirector","description":"","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-redirector","forks_url":"https://api.github.com/repos/Financial-Times/next-redirector/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-redirector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-redirector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-redirector/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-redirector/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-redirector/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-redirector/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-redirector/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-redirector/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-redirector/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-redirector/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-redirector/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-redirector/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-redirector/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-redirector/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-redirector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-redirector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-redirector/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-redirector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-redirector/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-redirector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-redirector/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-redirector/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-redirector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-redirector/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-redirector/releases{/id}","created_at":"2014-11-24T14:48:30Z","updated_at":"2015-06-23T12:06:27Z","pushed_at":"2015-07-14T10:41:55Z","git_url":"git://github.com/Financial-Times/next-redirector.git","ssh_url":"git@github.com:Financial-Times/next-redirector.git","clone_url":"https://github.com/Financial-Times/next-redirector.git","svn_url":"https://github.com/Financial-Times/next-redirector","homepage":null,"size":796,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"53cd6430b934292fbc419921b77d7440a1f83f23","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":27079929,"name":"next-redirector","full_name":"Financial-Times/next-redirector","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-redirector","description":"","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-redirector","forks_url":"https://api.github.com/repos/Financial-Times/next-redirector/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-redirector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-redirector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-redirector/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-redirector/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-redirector/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-redirector/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-redirector/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-redirector/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-redirector/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-redirector/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-redirector/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-redirector/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-redirector/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-redirector/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-redirector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-redirector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-redirector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-redirector/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-redirector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-redirector/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-redirector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-redirector/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-redirector/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-redirector/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-redirector/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-redirector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-redirector/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-redirector/releases{/id}","created_at":"2014-11-24T14:48:30Z","updated_at":"2015-06-23T12:06:27Z","pushed_at":"2015-07-14T10:41:55Z","git_url":"git://github.com/Financial-Times/next-redirector.git","ssh_url":"git@github.com:Financial-Times/next-redirector.git","clone_url":"https://github.com/Financial-Times/next-redirector.git","svn_url":"https://github.com/Financial-Times/next-redirector","homepage":null,"size":796,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47"},"html":{"href":"https://github.com/Financial-Times/next-redirector/pull/47"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/issues/47"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-redirector/statuses/22fbe96ba85bd013d9dbe890af17f1a0571dc31f"}}}}