最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Get posts from year from URL

programmeradmin5浏览0评论

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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论