What if you need to pass a slash?

Oh, the strange things mod_rewrite does!

What if you need to pass a slash?

Postby beatdown » Tue Aug 09, 2005 7:45 pm

Hello,

I am trying to rewrite this:

file.php?type=foo%2Fbar

into this

type/foo%2Fbar

(note %2F is a url encoded slash)

Apache is seeing it as a request for directory type/foo/bar (which does not exist) and giving a 404 error. How do I make apache NOT treat the result of the rewrite as a request for a directory?

Is it impossible?

Thanks.
beatdown
 
Posts: 3
Joined: Tue Aug 09, 2005 7:25 pm

Postby beatdown » Sun Aug 14, 2005 6:11 pm

To anser my own question:

Apache 1.X does not allow %2F to be in the URL. Apach 2.0 has a directive that allows this: AllowEncodedSlashes

That's that!
beatdown
 
Posts: 3
Joined: Tue Aug 09, 2005 7:25 pm


Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 3 guests

cron