Skip to content

valid app URL containing a period results in "Cannot GET" error #2168

Closed

Description

@chalin

The ng2.io app has pages at URLs like

http://localhost:4200/docs/ts/latest/quickstart.html

(note the .html suffix). I can navigate by clicking links in the app, but if I copy-paste a valid app URL (like the previous one), I get:

Cannot GET /docs/ts/latest/quickstart.html

And if we deploy to firebase, it all works fine. How can we coerce ng serve into playing nice?

  1. OS? OSX 10.11.6
  2. Versions.
    angular-cli: 1.0.0-beta.14
    node: 6.5.0
    os: darwin x64

cc @filipesilva @ericjim

Activity

  1. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Sep 16, 2016
  2. self-assigned this
    on Sep 16, 2016
  3. chalin commented on Sep 30, 2016

    @chalin
    Author

    ping

  4. changed the title [-]valid app URL (ending with .html) results in "Cannot GET" error[/-] [+]valid app URL containing a period results in "Cannot GET" error[/+] on Oct 3, 2016
  5. chalin commented on Oct 3, 2016

    @chalin
    Author

    Actually, a period anywhere in the URL causes this problem (Dart API URLs contain periods because of periods in library names like angular2.common).

    @naomiblack

  6. denkomanceski commented on Oct 5, 2016

    @denkomanceski

    +1

  7. denkomanceski commented on Oct 5, 2016

    @denkomanceski

    One way how I resolved this temporary is stop using html5 style and use hashstrategy instead

  8. filipesilva commented on Oct 5, 2016

    @filipesilva
    Contributor

    As context, there seems to be a solution in webpack/webpack-dev-server#303 but it requires rewriting on a case-by-case basis, which just wouldn't work for the CLI.

  9. filipesilva commented on Oct 5, 2016

    @filipesilva
    Contributor

    I've tested it and this option fixes our issue bripkens/connect-history-api-fallback@ee86111

    But it's part of 1.3.0 of connect-history-api-fallback which is not yet required by webpack-dev-server: https://github.com/webpack/webpack-dev-server/blob/master/package.json#L11 .

    It should just work due to semver though... I submitted a PR to make it explicit: webpack/webpack-dev-server#638

  10. added 2 commits that reference this issue on Oct 5, 2016
    fecabe7
    6723633
  11. added 3 commits that reference this issue on Oct 15, 2016
    4b0dfef
    5c88161
    4fd0bf3
  12. added a commit that references this issue on Oct 17, 2016
    6f8b1b5
  13. added a commit that references this issue on Oct 19, 2016
    067c63c
  14. added a commit that references this issue on Oct 21, 2016
    8a46cfb
  15. added a commit that references this issue on Nov 3, 2016
    76a8d96
  16. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  17. locked and limited conversation to collaborators on Sep 6, 2019
  18. added a commit that references this issue on May 29, 2026
    9aec9b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenttype: bug/fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions