Forum Moderators: phranque

Message Too Old, No Replies

Another Newbie Question on Mod Rewrites

sorry, Im sure you never get these

         

thaedge

2:19 pm on Sep 15, 2006 (gmt 0)

10+ Year Member



I have a similar question to thread [webmasterworld.com...] in that I am trying to figure out a way to parse out "+" from the URL.

As Im just learning the basics of mod rewrites now I am looking for any guidance on how to handle this.

Example

cat?varname=1345+thisisfun&anothervar=somevalue

I understand how to get 1$ and 2$ out of it but what about to take the "+" sign out and replace it with a - or _ or simply close the space?

If you know of a tutorial feel free to IM it to me.

Thanks to all in advance

jdMorgan

4:36 pm on Sep 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The "+" character is a regular expressions operator. Therefore you must escape it in regex patterns like this: "\+". Otherwise the regex parser will take the plus sign to mean, "one or more ocurrances of the previous character."

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

thaedge

3:09 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



Thanks - Id found most of those links from that page. Was just looking for other sites and the info you gave me :)

thaedge

4:35 pm on Sep 19, 2006 (gmt 0)

10+ Year Member



Actually Jd you answered what I was trying to do in another post. [webmasterworld.com...]

*I finally found an example to look at* :)