Title: URL structuring best practice.
Last modified: September 1, 2016

---

# URL structuring best practice.

 *  [gunnerman1](https://wordpress.org/support/users/gunnerman1/)
 * (@gunnerman1)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/url-structuring-best-practice/)
 * Hello,
 * I have been using Quick Redirects and Custom Permalinks plugins as well as .htaccess
   mods to manage websites url structure.
 * Starting to work on a contact page structure and am seeing a point where maybe
   it is better to use a custom post type instead of hard coding the redirects in.
 * We will have the URL structure /locations/state/city/contact/ and /locations/
   state/city/about/. So each city will have its own contact and about page. No 
   locations page will exist (for now), it is just there to help define the hierarchy.
 * So I am not sure of the best way to attack this. I want to keep that url structure
   visible but am also worried about the number of possible pages if I use the default
   Page with Parent/Child page attributes. Could become 50 pages for each state 
   then any number of city pages for each state.
 * Since most of these pages will have a very similar layout with just some different
   info it seems to lend itself instead to a query that could then rewrite the url
   to look ‘pretty’.
 * What would be the best way to attack this/ Custom Post Type? Using the rewrite
   api?
 * Thanks and sorry for my url rewrite questions it is just an area I am having 
   a hard time wrapping my head around in WP.

Viewing 1 replies (of 1 total)

 *  Thread Starter [gunnerman1](https://wordpress.org/support/users/gunnerman1/)
 * (@gunnerman1)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/url-structuring-best-practice/#post-7602388)
 * Thanks to [this answer on Stack Overflow](https://stackoverflow.com/questions/36667674/fancy-url-structure-conditional-content-and-search-using-cpt-custom-fields)
   which is just about exactly the question I have, I was able to learn a lot about
   redirecting.
 * There is also this route to follow [WP Codex example: Using Custom Templates with custom querystring](https://codex.wordpress.org/Rewrite_API/add_rewrite_rule)
   example.
 * I could then query the information from a custom post type based on the query
   string provided.
 * Thoughts/opinions?
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘URL structuring best practice.’ is closed to new replies.

## Tags

 * [url structure](https://wordpress.org/support/topic-tag/url-structure/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [gunnerman1](https://wordpress.org/support/users/gunnerman1/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/url-structuring-best-practice/#post-7602388)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
