I have a site configured with clean URLs, and I’m trying to determine the best way to add pagination to the URLs. Here are two I’m considering:
Option 1:
www.domain.com/news/page/2
Option 2:
www.domain.com/news/pg=2
Either of these formats will work with the site I’m setting up, but I just want to determine the best way to format the URL with page numbers. Any other methods I overlooked? Thanks!
What’s a good way to parse that, with an eregi() function to pull out the “pg” and “2” parts out of that string? I used the = equal sign with explode() to easily get a key/value pair, which gives me some flexibility to create other key=value pairs.
So do you think using /news/pg=2 is okay and no different from using /news/page/2 for pagination urls? Just not sure if there are any drawbacks or advantages to either method.
My angle was from the user perspective. I think the pg=2 is a better description of page 2 of the news article(s) than having a separate step (page) to describe it is the page 2 (2).
As a user I might assume the URL is the file path and find an extra directory to collect pages and then name them as a number to be a bit odd.
Just my two cents. I haven’t thought much of this problem before.