Routing Url ID not working

Hello,

I need help with routing. I tried for hours to see why one of the page is not working. I couldn’t find the why and how to fix it.
Here is the problem: I followed all the available steps for routing. Nothing.
I am trying to filter a page by id_blog using the url parameter.
But the page does not respond at all.

https://www.1connect1.com/blog/

If anyone can help. Please. Thank you

/blog and /Blog are two different routes.
You should be able to see the query param by the name of id_blog on url /Blog/xxx/

I changed to make sure it is /blog/xxx/
I noticed that /Blog/xxx/ was affecting css. Not /blog/xxx/

But the query output is not showing at all.

The id_blog is visible in the url but the page is filter.
here is one of the page with id_blog.

https://www.1connect1.com/Blog/blogpost.php?id_blog=34

https://www.1connect1.com/blog/34/seo-effective-date/

While this may not solve your issue, it might be mindful to read it over, Custom middleware(routing) to discriminate URL parameters

I’ll keep looking, I seem to recall this coming up before.

@mamdi122003,

Just wanted to check to see if after any changes, you had uploaded the .htaccess file containing the routing information.

Both pages with the url parameter loaded for me but the routing one doesn’t load the post, are you sure the state manager is passing the url param to your server connect?

Yes, I am sure. That is why you see other page loading the post but other link does not.

This post shows the routes have changed.
Not sure what part you need help with.
Using ?id_blog does not require any route definition.

Just to make things clear, can you please point to 1 route which you have setup on routes panel, and share the link to that route?

This is the main page: https://www.1connect1.com/Blog/blogpost.php?id_blog=34
I am trying to change and make the route work with the query.
I was pointing out that state manager is not the issue and server connect is also not the issue because they both work when I remove the route.

Here is the link of that point to the route.
https://www.1connect1.com/blog/

For the main page URL that you have shared, you want the URL to look something like:
https://www.1connect1.com/blog/34
Is that correct?

No! When you click on any of the card it will direct you to the page with filter id_blog.
As you see in https://www.1connect1.com/blog/34 there is not return of output. That is where I am having a headache.

I maybe wrong but you are sending 2 different variables in the headers what is defined in your state manager one header is sending ?idblogpost=34 (non working one) the other is ?id_blog=34 (working one)

What card?
What is the purpose of this link: https://www.1connect1.com/Blog/blogpost.php?id_blog=34
Why have you shared this?

For the link https://www.1connect1.com/blog/34, what does the route definition in routes panel look like?

The first link is the same page as the link at the bottom.
for some reason, that one works but the second one with route does not work.
I shared that to give you more understanding of the situation
When you click on any of these three. It will redirect you to the page that gives you a filter query with url.
But the output is not showing.
I don’t know if you understand my issue clearly.

It was removed but I still have the issue. If you still see it you will have to refresh or clear the browser.

To be honest, I am even more confused with this latest post.
Routing is pretty simple. And so are the setting the params.
Most likely you are mixing multiple things leading to all the confusion and issues.

See if this helps:

  1. Routing is just a simpler more readable name for existing pages.
  2. Fo eg: A URL like https://www.1connect1.com/Blog/blogpost.php?id_blog=34 will be more readable if it looks like https://www.1connect1.com/blog/34.
  3. To do this, all you have to do is add a new route for page /Blog/blogpost.php in routes panel and set it to something like: /blog/:id_blog
  4. That’s it. Now, both the links will open the exact same page with exact same data loaded.

I did that. The first link is showing the data but not the second one.

Are we looking at the page with business hours on because the first links you posted didn’t have that?

It is not supposed to go there. That is another route,.
For some reason, these routes are going something I did not ask them.

The route /blog/:id_blog is NOT pointing to blogpost.php
Or, you have some other route in place, with similar param structure, which is overriding this route.

This is what I see on /blog/34 URL: