IIS Mod Rewrite

Associate
Joined
13 Nov 2003
Posts
1,567
Location
Manchester
Hi All

Working on giving our site nice SE friendly URLS.

Most of them I can do fine but the issue comes when I start with the dynamic urls, take this example.

display_cat.asp?catid=1&catname=designer-bags

Now I want to write that out as

www.domain.com/cat/designer-bags

I need the ID for the selecting the records etc, but I don't really want to display the ID in the url

Is this possible?

Thanks
Aaron
 
does the link that sends you to the display_cat.asp page have to be a text link or could it be a button on the page?

if you can use a button you could use a post form to send the variables you need.. something like:


on sending page to create a button called "deisgner bags":

Code:
<form name='sendme' method='post' action='display_cat.asp'>
<input type='hidden' name='catid' value='1'>
<input type='hidden' name='catname' value='designer bags'>
<input type='submit' value='designer bags'>
</form>


on display_cat.asp you can call the variables back using:

Code:
cat_id = "" & request.form("catid") & ""
cat_name = "" & request.form("catname") & ""

which would mean the address bar would just say:

http://www.domain.com/cat/display_cat.asp

?
 
Thats not ideal, as there are so many links that the code would become very bloated very quickly.

Thanks for the idea though, would be ok if we had less links

Aaron
 
Back
Top Bottom