This is a discussion on "Mod - Rewrite Question" within the PHP Forum section. This forum, and the thread "Mod - Rewrite Question are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Mod - Rewrite Question
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hi All you php people
I have a question if anyone could help with the answer there a brownnie point When a mod-rewrite is done where are the words picked up from ie http://www.thesitebox.com/shopWebSit...Page.php?cat=4 should read something like thesitebox.com/power_tools/4 or what ever Is the code replaced by the page title or h1 header or something like that or does it work in a complete diffrent way. Any info will be of a help just so I can understand a little of how it works. Thanks Ed |
|
|
|
|||
|
Do you mean where does the text after the question mark come from in the URL?
Like in: http://www.thesitebox.com/shopWebSit...howCatPage.php?cat=4183If you make some links such as <a href="www.abc.com.index.php?cheeseType=cheddar>Che ddar</a> <a href="www.abc.com.index.php?cheeseType=swiss>Swiss </a> <a href="www.abc.com.index.php?cheeseType=goat>Goat</a> Then you can use... $varTypeOfCheese= $_GET('cheeseType'); So you can set a variable that is passed throught the URL So in your php code you could write... echo "You like $varTypeOfCheese the best!"; and $varTypeOfCheese would be equal to whataver link they clicked on. Hope this helped! |
![]() |
| Tags |
| mod, rewrite, question |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rewrite URL name? | nate2099 | Web Page Design | 1 | Feb 25th, 2008 10:33 |
| mod rewrite url format | jhappeal | Search Engine Optimization (SEO) | 9 | Jan 19th, 2008 13:23 |