Forum Moderators: phranque

Message Too Old, No Replies

Is it possible to use ampersand in urls when using mod_rewrite?

         

referer

8:10 am on Oct 1, 2004 (gmt 0)

10+ Year Member



I'm using mod_rewrite and want to be able to use the ampersand (&) in urls.

/java%26internet

should become

/search.php?title=java%26internet

instead of

/search.php?title=java&internet, which breaks up into "title=java" and a useless "internet"

coopster

10:51 pm on Oct 1, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have seen this before, and I've seen it working. Here is the relative thread that got me thinking about it.

[webmasterworld.com...]

I started doing some playing around ... can't find my docs right now. I know I hit the RFC's to see if the syntax was legal. If I remember correctly, I want to say I was thinking they must have used some form of mapping...

Anyone else?

jdMorgan

11:22 pm on Oct 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm still not sure I understand the question, but if you wish to embed %26 in the URL, you'll want to use the [NE] (noescape) flag on your rules so that mod_rewrite doesn't try to escape the "%" character.

Jim