Skip to content

Linking to a deep link fails when used with "path" URL strategy #10565

Closed
@bholben

Description

@bholben

Ionic version: (check one with "x")
[ ] 1.x
[X] 2.x

I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
When in development with ionic serve and using the default hash URL strategy, I can configure a segment like this segment: 'product/:productId'. I can successfully navigate to this page and the URL looks like this...http://localhost:8100/#/product/12876. When I paste the URL into a new browser tab, it comes up again. BTW, beautiful job. I'm so stoked about the simplicity of this "router".

When I change the hash strategy to { locationStrategy: 'path' } and set <base href = '/'> in my index.html file, everything works great when navigating in the app. However, I can no longer reach the page when I paste the http://localhost:8100/product/12876 URL into another browser tab. I'm getting a 404.

I have not tested this outside my localhost environment.

Expected behavior:
Deep linking should work when using the path locationStrategy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions