php - Get posts from year from URL

I've created a page that shows content from a specific year. The year will be defined in the url. Example url: sta

I've created a page that shows content from a specific year. The year will be defined in the url. Example url: /stats/tour/?year=2019

It works perfectly when I type year=2019 but other on other year I get a 404 page. Don't know why because the other years definitely exist. And why does it gives an error, because it's just a simple parameter in the url?

I've created a page that shows content from a specific year. The year will be defined in the url. Example url: https://mpdb.space/stats/tour/?year=2019

It works perfectly when I type year=2019 but other on other year I get a 404 page. Don't know why because the other years definitely exist. And why does it gives an error, because it's just a simple parameter in the url?

Share Improve this question asked Dec 22, 2019 at 16:21 DennisDennis 1358 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

It seems that "year" is a reserved word. I've changed it to "tour" and it works perfectly.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744883807a4598997.html

相关推荐

  • php - Get posts from year from URL

    I've created a page that shows content from a specific year. The year will be defined in the url. Example url: sta

    1天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信