Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

.htaccess/mod_rewrite: domain.com/country/area/city.html

11:16 am on Aug 26, 2003 (gmt 0)

New User

10+ Year Member

joined:Aug 26, 2003
votes: 0

Hi there!

I wanted to reply to the last thread - but unfortunately it has been closed.

I would welcome it, if in future those people who have had a question/problem also post the final solution to their problem, so others could benefit from it.

Someone asked about how the .htaccess file has to look in order to be able to rewrite country/area specifically.

I do have a smiliar problem, not with countries/areas, but this would be a good example to explain the matter again.

The questions are:

1. How does an .htaccess file look like, that will allow:

domain.com/usa should exist
domain.com/usa/california should exist

and domain/usa/california/someCity should exist

and domain/usa/california/someCity/weather.html
for instance

but also
domain/usa/california/someCity/(.*).html script.php?par=$1
for all kinds of those 3 parameters?

2. How can I also achieve that the picture urls will always be found?

3. What would the condition be to avoid circular references?



4:09 pm on Aug 26, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 21, 1999
votes: 0

Hey percy, post your solution and perhaps our regulars will help you debug it, if needed.