question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Route paths with multiple slashes not loading

See original GitHub issue

I have:

['/', List]
['/page/:pageNumber', List]

in my router. If I navigate to ‘/’ I can click the links I have set up such as

html`<a href="/page/${ pageNumber + 1 }">More</a>`

to change the page number and have the route change to ‘blahblah/page/2’ in the address bar. However, I can not seem to directly navigate to any route with multiple slashes. I get a 404 if try to go to the page directly.

I am serving this with budo locally. I understand this is probably something more to do with budo/sheet-router. I couldn’t come up with anything after perusing through the sheet-router and budo docs. I was wondering if someone could point me in the right direction? Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
josephluckcommented, Feb 19, 2017

Hey, you probably need to use budo --pushstate option. On 19 Feb 2017 06:22, Ryan Eppers notifications@github.com wrote:I have: [‘/’, List] [‘/page/:pageNumber’, List]

in my router. If I navigate to ‘/’ I can click the links I have set up such as html<a href="/page/${ pageNumber + 1 }">More</a>

to change the page number and have the route change to ‘blahblah/page/2’ in the address bar. However, I can not seem to directly navigate to any route with multiple slashes. I get a 404 if try to go to the page directly. I am serving this with budo locally. I understand this is probably something more to do with budo/sheet-router. I couldn’t come up with anything after perusing through the sheet-router and budo docs. I was wondering if someone could point me in the right direction? Thanks.

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

0reactions
josephluckcommented, Feb 21, 2017

No worries, glad you got it sorted!On 21 Feb 2017 06:50, Ryan Eppers notifications@github.com wrote:Thanks for offering to check. I found out the --base option is also needed for nested paths to work correctly. Everything works as intended now 😃 Again, I appreciate you following up with me.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

why does my react switch router not work if my path has more ...
The problem is that your project is NOT using server side routing. I placed a component in your parent Component (Articles) and clicked...
Read more >
React-router (v4) Double slashes Fix | Do Meraki Inc
Fix React-router double slashes that make urls do not open any route and a blank screen appear.
Read more >
Double slash before Router (router//route) #4427 - GitHub
Hello, when i assign a router to the route, then there is access to routes with a double slash at the beginning. example:...
Read more >
hapi — Ignore Trailing Slashes on Route Paths - Future Studio
Within the route handler, you differenciate between the two situations: whether a slug is available or not. server.route( { method: 'GET', path: ...
Read more >
Route - Angular
An object specifying a lazy-loaded component. redirectTo?: string. A URL to redirect to when the path matches. Absolute if the URL begins with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found