{"action":"created","issue":{"url":"https://api.github.com/repos/processwire/processwire-issues/issues/55","repository_url":"https://api.github.com/repos/processwire/processwire-issues","labels_url":"https://api.github.com/repos/processwire/processwire-issues/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/processwire/processwire-issues/issues/55/comments","events_url":"https://api.github.com/repos/processwire/processwire-issues/issues/55/events","html_url":"https://github.com/processwire/processwire-issues/issues/55","id":184183860,"number":55,"title":"Non-ansi non-existent urls get redirected to frontpage (not to 404 page)","user":{"login":"ivangretsky","id":6697626,"avatar_url":"https://avatars.githubusercontent.com/u/6697626?v=3","gravatar_id":"","url":"https://api.github.com/users/ivangretsky","html_url":"https://github.com/ivangretsky","followers_url":"https://api.github.com/users/ivangretsky/followers","following_url":"https://api.github.com/users/ivangretsky/following{/other_user}","gists_url":"https://api.github.com/users/ivangretsky/gists{/gist_id}","starred_url":"https://api.github.com/users/ivangretsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivangretsky/subscriptions","organizations_url":"https://api.github.com/users/ivangretsky/orgs","repos_url":"https://api.github.com/users/ivangretsky/repos","events_url":"https://api.github.com/users/ivangretsky/events{/privacy}","received_events_url":"https://api.github.com/users/ivangretsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-20T09:51:41Z","updated_at":"2016-10-20T19:54:12Z","closed_at":null,"body":"<!--\r\nIf you want your bug report\r\n* to be more difficult to process and understand\r\n* to have many unnecessary follow-up questions\r\n* to take longer to fix then necessary\r\ndon’t use this issue template.\r\n\r\nIf you want your bug report \r\n* to be concise and easy to understand\r\n* to not have any (or very few) follow-up questions\r\n* to take faster to fix\r\nuse this issue template. Thank you.\r\n-->\r\n\r\n### Short description of the issue\r\n\r\nNon-existent non-ansi urls (like /привет or /首次提交资源) get redirected to frontpage instead of a 404 page. The http code seems to be 404 as it should.\r\n\r\n### Expected behavior\r\n\r\nThey must be redirected to 404 page with 404 http code.\r\n\r\n### Optional: Suggestion for a possible fix\r\n\r\nMust be something .htaccess related\r\n\r\n### Setup/Environment\r\n<!--\r\n* Include as many relevant details about your environment setup as possible.\r\n* Hint: Using the Tracy Debugger module makes this a breeze: https://processwire.com/blog/posts/introducing-tracy-debugger/#versions-list\r\n-->\r\n\r\n* ProcessWire version: Tried it on 3.35, 3.36, 3.37 (with no luck). On some earlier 2.x installs the issue does not exist.\r\n"},"comment":{"url":"https://api.github.com/repos/processwire/processwire-issues/issues/comments/255210444","html_url":"https://github.com/processwire/processwire-issues/issues/55#issuecomment-255210444","issue_url":"https://api.github.com/repos/processwire/processwire-issues/issues/55","id":255210444,"user":{"login":"ryancramerdesign","id":328272,"avatar_url":"https://avatars.githubusercontent.com/u/328272?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancramerdesign","html_url":"https://github.com/ryancramerdesign","followers_url":"https://api.github.com/users/ryancramerdesign/followers","following_url":"https://api.github.com/users/ryancramerdesign/following{/other_user}","gists_url":"https://api.github.com/users/ryancramerdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancramerdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancramerdesign/subscriptions","organizations_url":"https://api.github.com/users/ryancramerdesign/orgs","repos_url":"https://api.github.com/users/ryancramerdesign/repos","events_url":"https://api.github.com/users/ryancramerdesign/events{/privacy}","received_events_url":"https://api.github.com/users/ryancramerdesign/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T19:54:12Z","updated_at":"2016-10-20T19:54:12Z","body":"What's happening is that characters in the URL are not in the pageNameWhitelist so ProcessWire isn't getting to see them at all. So it falls back to /index.php, which can't see the invalid chars. Something you can do to alter the behavior is to comment out this line at the top of your .htaccess file, by adding a \"#\" in front of it:\r\n~~~~~\r\n# ErrorDocument 404 /index.php\r\n~~~~~\r\nOr if you don't want the default Apache 404 showing, you can do this:\r\n~~~~~\r\nErrorDocument 404 /index.php?it=/http404/\r\n~~~~~\r\nMaybe that should be our default, but there's a good chance that either of these suggestions may interfere with other things like secure page files and perhaps things like the redirects module. Still, if this is coming up as a recurrent problem on a site, this is what I'd recommend at the moment."}}
{"actor":{"display_login":"ryancramerdesign"}}