Faking sub-pages through the same page template
-
Hi,
I have a number of pages that I want to sort alphabetically and create sub-pages. These would look something like this:
https://www.www.com/widgets/A/
https://www.www.com/widgets/B/
…
https://www.www.com/widgets/Z/I have a code that runs in a widget.php page template that I want to apply to a page (let’s call it widgetBase). What I am trying to do is avoid having to create all the pages in WordPress (‘A’, ‘B’, ‘C’, etc) and assign them the same template. Instead, I would like to redirect the pages to the same template using htaccess. Is this even possible?
Basically, I want my url to stay as above, but behind the scenes the php that gets executed would be something like:
https://www.www.com/widgets/widgetBase?letter=A
https://www.www.com/widgets/widgetBase?letter=B
…
https://www.www.com/widgets/widgetBase?letter=ZI am not sure if this makes a lot of sense? I know I can create the pages individually and redirect them with a redirect plugin to point to widgetBase?letter=<x>, but I was wondering if there is a better, easier solution using .htaccess?
Thank you!
Iulian
- The topic ‘Faking sub-pages through the same page template’ is closed to new replies.