I need some help, It′s my first time using the Rewrite Rule for a link.
My website is a eshop.
The url will be something like this:
www.mydomain.com/shop.php
This file, shop.php will receive up to 3 parameters throught the url.
Example:
Case 1: www.mydomain.com/shop.php?page=1
Case 2: www.mydomain.com/shop.php?page=1&category=1
Case 3: www.mydomain.com/shop.php?page=1&category=1&subcategory=3
What I need is that the Rewrite Rule returns me something like:
Case 1: www.mydomain.com/shop.html/1
Case 2: www.mydomain.com/shop.html/1/FeaturesItems/
Case 3: www.mydomain.com/shop.html/1/FeaturesItems/BrandName
Let's Imagine that FeaturesItems is the Category that his Id is the number 1.
Let's Imagine that BrandName is the SubCategory that his Id is the number 3.
Can you help me to create the rewrite rule?
The other question is, in shop.php I can read the $_GET['category'] with the Id?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…