Mod - Rewrite Question

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 16th, 2006, 07:34
New Member
Join Date: Jan 2006
Age: 49
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ed Oliver
Exclamation Mod - Rewrite Question

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
Reply With Quote

  #2 (permalink)  
Old Mar 16th, 2006, 11:06
Up'n'Coming Member
Join Date: Feb 2006
Location: London
Age: 25
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Re: Mod - Rewrite Question

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!
Reply With Quote
Reply

Tags
mod, rewrite, question

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 05:39.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43