i’m having a geo database like the following
id contintent
------------
1 europe
2 usa
id country
-----------
21 germany
22 france
id city
-----------
50 paris
51 berlin
let’s say i’m having this url:
/show.php?contintentID=1&countryID=21&cityID=51
how can i translate it using modrewrite to a proper like:
/europe/germany/berlin/index.html
i think it’s beyond usual modrewrite ..
any ideas? please help – thanks!
why would it be beyond usual modrewrite? If you make sure there’s a proper field in the database that has no special characters (I always call this field pre_field_seo, for news title this would be: new_title_seo) where I put the title without spaces, special characters etc. so SEO ready.
The demo data you provider is perfect, but make sure you don’t have München for example, the right seo name would be munchen or muenchen in that case, whatever fits you best.
There’s only one rewriterul needed:
Ofcourse this also means that show.php must be converted in order to find the names in your database instead of the IDs. The IDs however can be added and used with the following setup:
In that case you would need this rewriterule: