Forum Moderators: open
Just a quick question about ISAPI rewrite, I just tried to reply to an older post after searching but the forum said it was too old.. Anyhow...
I basically want to do the following, but as I've never touched any sort of rewrites at all am a bit stuck!
For example if we had a URL of:
www.example.com/product.asp?PID=123
I would like the URL using ISAPI rewite to be something like:
www.example.com/PRODUCT TYPE/BRAND/SERIAL NUMBER/123.htm
The thing I can't figure out is how to get the rewrite to ignore the "/PRODUCT TYPE/BRAND/SERIAL NUMBER" bit and then construct the URL from whats left... If anyone could help I'd be eternally grateful. I realise this may not be the best forum to post in, but it didn't seem relevant to any others.
Thanks guys / gals!
Rob.
RewriteRule ^/.*/(\d+).htm$ /product.asp?PID=$1
>Is there any chance i could ask at all just what does what in that statement at all?
^ = match the start of a string
.* = match 0 or more characters
() = capture data
\d = capture any sequence of one or more decimal characters
$ = match the end of the string
$1 = output the first capture, i.e the contents of (\d+)
[regexlib.com...]