Extending rewrite rules (1 post)

  1. sccr410
    Posted 5 years ago #

    I am trying to extend the rewrite rules for a directory.

    I am setting up 50 pages, 1 for each state. The default rewrite rules handle these pages.

    EX: http://www.domain.com/directory/california

    However, I want to extend URLs to also include one more level of detail - cities.

    EX: http://www.domain.com/directory/california/san-diego

    However, doing this returns a 404 because there is no page created for San Diego. I don't want to create pages for San Diego. I essentially want this:


    rewrites to


    I will use template logic to then determine if a city is defined - if so, show all listings within the city. If no city is defined, show all the available cities for the current state.

Topic Closed

This topic has been closed to new replies.

About this Topic