This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
LinkFreeze (Forum Locked Forum Locked)
 Helicon Tech : LinkFreeze
Subject Topic: %20 to dash (Topic Closed Topic Closed)
Author
Message |
3plains
Newbie


Joined: 07 January 2007
Location: United States
Posts: 14
Posted: 17 January 2008 at 7:24pm  

Have a space (%20) to dash (-) problem:

Have this currently:

http://www.barkerhedges.com/White%20Bear%20Lake/MN/Land/

Need to do this instead:

http://www.barkerhedges.com/White-Bear-Lake/MN/Land/

How do I convert theses space or %20 to a dash (-)? There may be 0 -5 spaces depending on the city.

This is what I have so far:

RewriteRule /([^/]+)/([^/]+)/([^/]+)/ /listings/type.cfm\?city=$1&state=$2&type=$3 [I,L]

This is the exact page:

http://www.barkerhedges.com/listings/type.cfm?city=White%20Bear%20Lake&state=MN&type=Land

Back to Top Visit 3plains's Homepage
 
Yaroslav
Admin Group


Joined: 15 August 2002
Posts: 6520
Posted: 21 January 2008 at 6:20am  

In fact ISAPI_Rewrite is not a best place to do such transformation. I suggest you to pass these parameters as is into your script (i.e. with dashes) and decode dashes in the script code.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top Visit Yaroslav's Homepage
 
3plains
Newbie


Joined: 07 January 2007
Location: United States
Posts: 14
Posted: 27 January 2008 at 3:49am  

Yaroslav, you are correct... I wasn't thinking that night. Wrote a ColdFusion Replace function and it worked like a charm.

Back to Top Visit 3plains's Homepage
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum