URL question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
frozen
Forum Newbie
Posts: 8
Joined: Fri Feb 22, 2008 11:43 pm

URL question

Post by frozen »

Hi,

I'm going to use mod rewrite to make my URLs look like this. http://www.mysite.com/(anything I want)_112.html

So on my front page where I list many products. It will call up the database, and take the product id and product title and use that to build my links through to the main product page. Where full pics and description will be.

So it will look like this ww.mysite.com/dice_12.html when clicked through to the main page of the product.

Now the thing I want to know is, if someone messes with the title part in my URL it will still show fine if they leave the 12 part alone. And I want it so the main product page can replace the title back in the URL once they hit enter again after messing with the title part.

I'm not sure how it's done, but I have seen it done on another site. Can anyone let me know what I can use to do this?

Thanks

Bradley
Post Reply