Click to See Complete Forum and Search --> : Simplified variable URL


heavenly_blue
09-12-2005, 03:39 PM
I've seen this done before, but I don't think it used ASP.

I have a page with a URL that looks like:

http ://mysite.com/myscript.asp?id=4096

How can I make it so I can allow users to just use:

http ://mysite.com/4096

and still have it function the same way as the first URL?

The number is a variable used by the script.

heavenly_blue
09-12-2005, 06:29 PM
Never mind, I found what I was looking for.

http://www.iismods.com/url-rewrite/index.htm

This is the what I used in the .ini file to make it work the way I needed it to:

RewriteCond URL ^/\d+$
RewriteRule ^/(.*) /myscript.asp?id=$1

Bullschmidt
09-13-2005, 11:20 PM
Cool link and thanks for showing what you found! :)