I am have a clear URL based system so the categories will be shown like this
http://www.mysite.com/category/23/cat-name
Inside the categories page I have some sorting and pages options such as sorting by latests and lower price. Also, I have a pages navigation system
The problem is when the request is happening inside the page the $_GET[]
doesn't show the variables I need. However it shows in the URL as
http://www.mysite.com/category/23/cat-name?page=3
The $_GET
variable only shows the id of the category which is in our case now = 23
and ignored the page number which is in the url.
.htaccess
content
RewriteEngine On
RewriteRule ^category/([0-9]+)/[a-z][-a-z0-9]*$ cat.php?id=$1
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…