Redirect and keep the url parameter

Mar 26, 2008 at 6:57 PM
Normally a link looks like this:
www.mysite.com?view=some_name

What I need is a link like this:
www.mysite.com/view/some_name

But if you enter www.mysite.com/view/some_name it will look for a
folder
called some_name.

In the folder view I have an index.cfm file that will read the param from
the url string:
<cfset user_name = listLast("#request.UrlStr#","/")>
and get the some_name from a database.

And then display the user’s page.
That’s why it looks like a redirect to the same page.

And it is (in some way), except that the param will change and also use
friendly urls (here so short as possible).

You see an example of this if you click on the members photos on this
link: www.scandicdate.com

If you look at one link, you see:
http://www.scandicdate.com/go/view-profile?member=some_name

My client wants a short and friendly link like:
http://www.scandicdate.com/view/some_name

So I will change the link under the member’s photo to:
http://www.scandicdate.com/view/some_name

And redirect that link to http://www.scandicdate.com/view/index.cfm

Where I read the param from the url string:
<cfset user_name = listLast("#request.UrlStr#","/")>
and get the some_name from a database.

And then display the user’s page.

So – my big question is how to write this ISAPI Rewrite rule for MS 2003 IIS server?


Regards
Rune
Coordinator
Apr 15, 2008 at 6:19 PM
Too much information!

Can you ask a simpler question?