Problème with Human-friendly URLs

Notice: This thread is very old.
fan2misa
Member | 6
+
0
-

Hi everybody.
I have a problem with my URLs. I would URL like this :

http://localhost/mywebsite/www/blog/page/1
http://localhost/mywebsite/www/blog/page/2
http://localhost/mywebsite/www/blog/page/2

But I have this URLs :

http://localhost/mywebsite/www/blog?page=1
http://localhost/mywebsite/www/blog?page=2
http://localhost/mywebsite/www/blog?page=3

And in my router, I have this :

$router[] = new Route('blog', 'Frontend:Blog:index');
$router[] = new Route('blog/page/<page \d+>', 'Frontend:Blog:index');

Can you help me for it please ?

Majkl578
Moderator | 1364
+
0
-

That should work, try swapping those routes so the one with “page” is before the first more generic one.

fan2misa
Member | 6
+
0
-

great. thanx for it ^^. you save me.

Majkl578
Moderator | 1364
+
0
-

There is simple rule to follow when writing rules – most specific at top, most generic at bottom.