Creating custom URLs for one page
-
I’ve got a wordpress installation running a custom made theme. There is a hotels page that calls a custom shortcode. It works as such:
https://www.website.com/hotels/?hotel=1 – Shows hotel with according ID
What I’m trying to achieve is to change this to a custom link, something like:
https://www.website.com/hotels/country/city/hotelname-1/
So far the regex works and I get a normal redirect from the rule above to https://www.website.com/hotels/?hotel=1. But when I’m trying to make the same thing work without redirecting the https://www.website.com/hotels/country/city/hotelname-1/ page, I get the 404.
What’s the correct way to make this work?
/hotels/ is just an ordinary page
/hotels/country/city/hotelname-1/ should load same as /hotels/?hotel=1
Thanks.
- The topic ‘Creating custom URLs for one page’ is closed to new replies.