fl00d
10-30-2007, 02:28 AM
Hi,
I've been recently reading up on Apache's mod rewrite feature. At the moment I'm a bit puzzled about how it works exactly but I'll figure it out eventually. Anyways, my question is do I have to write a rewrite rule for every page?
For instance, say I want news.php?cat=tech&id=2 to be like /news/tech/2/
and tutorials.php?cat=html&id=65 to be like /tutorials/html/65/, would I have to have a separate rewrite rule for each? 2 different pages = 2 different rules?
Or is there a one way all page sort of thing?
I'm guessing its a rule for every page...
*edit*
One more thing, do I still use $_GET (ex: $_GET['cat']) for the variables? Or do I need to explode it?
I've been recently reading up on Apache's mod rewrite feature. At the moment I'm a bit puzzled about how it works exactly but I'll figure it out eventually. Anyways, my question is do I have to write a rewrite rule for every page?
For instance, say I want news.php?cat=tech&id=2 to be like /news/tech/2/
and tutorials.php?cat=html&id=65 to be like /tutorials/html/65/, would I have to have a separate rewrite rule for each? 2 different pages = 2 different rules?
Or is there a one way all page sort of thing?
I'm guessing its a rule for every page...
*edit*
One more thing, do I still use $_GET (ex: $_GET['cat']) for the variables? Or do I need to explode it?