Hi all
I will try to keep this very brief.
I have built many e-commerce websites over the years and most of the URL's to product detail landing pages would be structured as follows (I have used cars as an example below):
mydomain.com/shop/nissan/qashqai/
Now I normally redirect all my HTTP requests through to the index.php script using .htaccess rewrite rules and I then take the first part of the URL (e.g: /shop/) to pull up my shop.php script and the last part of the URL (e.g: /qashqai/) and look for a record in my product database that matches that URL and display the product details accordingly in the shop.php script to the user.
Now I am looking to change this format so when a user clicks to view the product details, the URL will be:
mydomain.com/qashqai/
As you can see there is no "category" and no "shop" and the URL count is only 1 part.
I was wondering how it would be possible to know if the user is requesting to view a Product or simply requesting to look at a dynamic page of text such as:
mydomain.com/dynamic-text-page
because I have no "shop" prefix in my URL to work from, what would be the best method to achieve my goal?
I hope I have explained my question clearly.
Thanks
kbc