How to remove # from the URL routes?

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
thebr
Posts: 3
Joined: 24 May 2022, 06:13

24 May 2022, 06:19

Hello, I have recently bought this template using my company account, but when using this template, I came across a small issue that is bothering me.
The routes always seem to add

Code: Select all

#
after the

Code: Select all

/
For example, the homepage is

Code: Select all

localhost:3000/#
And because of that, if I have to go to any of my routes, such as Settings, it is always

Code: Select all

localhost:3000/#/settings
When I manually enter the URL

Code: Select all

localhost:3000/settings
, it does not recognize the route and proceeds to show the home component because there is a missing

Code: Select all

#
in the URL.
When I enter a URL that does not match any path, I would expect it to show the invalid page component which is already available in the template, please help me with how I can implement the same and also solve this URL issue.

Thanks.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

25 May 2022, 12:19

Hi,

All Layouts use React Router in Create React App project. You can update the router according to your needs. For your case, please review;
https://stackoverflow.com/questions/351 ... act-router
https://reactrouter.com/docs/en/v6

Best Regards,

Post Reply

Return to “Babylon - PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests