php - nginx : differentiate urls with rewrite rules -


i differentiate urls, structure :

http://domain/category 1/              /category n/              /region 1/              /region n/              /city 1/              /city n/ 

the number of different possibilities minimum 40k, wondered how know if parameter in url chosen city, region or category?

any idea ? or maybe parameter rewrite rule , make tests queries in database? better? how many rewrite rules nginx can support ?

i suspect want along lines of:

rewrite ^/(\w+)\%20(\d+)/$ index.php?category=$1&id=$2 last; 

this should rewrite url parameters on php script. should easier maintain 40k of rules.

(note above untested, off top of head)


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -