T0PS3O
Sep 12th 2004, 1:37 pm
I've spent all afternoon and evening reading the literature on apache's rewrite module. Most tutorials are either too basic and most serious papers are too complex IMHO.
Question: Is the following possible at all?
For a new project I'd like to use the following URL structure:
w ww.domain.com/script/category/grandparent/parent/child (not sure on trailing slash here at the end)
and have it reconverted to:
w ww.domain.com/script.php?cat=category&grp=grandparent&par=parent&chi=child
What I've gathered over the last few hours is that it is quite easy yo have it like:
w ww.domain.com/script/cat/category/grp/grandparent/par/parent/chi/child
but that is not how I want it.
Is it possible at all to have it like I want where the rewrite rules basically says: the first dir calls the appropriate php script, the 2nd directory name will be the value of the variable $cat etc. etc.
Please let me know whether I should continue my research or just stop wanting it my way and rethink my strategy.
Question: Is the following possible at all?
For a new project I'd like to use the following URL structure:
w ww.domain.com/script/category/grandparent/parent/child (not sure on trailing slash here at the end)
and have it reconverted to:
w ww.domain.com/script.php?cat=category&grp=grandparent&par=parent&chi=child
What I've gathered over the last few hours is that it is quite easy yo have it like:
w ww.domain.com/script/cat/category/grp/grandparent/par/parent/chi/child
but that is not how I want it.
Is it possible at all to have it like I want where the rewrite rules basically says: the first dir calls the appropriate php script, the 2nd directory name will be the value of the variable $cat etc. etc.
Please let me know whether I should continue my research or just stop wanting it my way and rethink my strategy.