Multiple Slashes and RewriteRules in Apache 2
am 19.11.2007 00:45:38 von mpatfield
My web host just upgraded to Apache 2. I had some RewriteRules which
changed http://example.com//query_string into http://example.com/?q=query_string.
It was working fine before the switch, but now those two forward
slashes are being converted into a single forward slash before even
reaching the RewriteRules.
Does anybody have any idea why this would be happening? Is there some
flag I can set or something to make it behave like Apache 1.3 did?
Any help would be greatly appreciated!
Thanks,
Martin
Re: Multiple Slashes and RewriteRules in Apache 2
am 19.11.2007 02:12:52 von shimmyshack
On Nov 18, 11:45 pm, mpatfield wrote:
> My web host just upgraded to Apache 2. I had some RewriteRules which
> changedhttp://example.com//query_stringintohttp://example.co m/?q=query_string.
> It was working fine before the switch, but now those two forward
> slashes are being converted into a single forward slash before even
> reaching the RewriteRules.
>
> Does anybody have any idea why this would be happening? Is there some
> flag I can set or something to make it behave like Apache 1.3 did?
>
> Any help would be greatly appreciated!
>
> Thanks,
> Martin
what does // mean, should it have been used in the first place - just
because it /worked/ ?
I would favour
http://example.com/q/some_string into http://example.com/?q=some_string
if you really have to do it at all.
If you find you have to rewrite your code, then may I suggest
conforming to a more standard scheme:
W3 Consortium: Naming and Addressing (URIs)
RFC 4395 -- new URI schemes
RFC 1808 -- standard (relative URLs)
RFC 2396 -- standard (URI syntax)
RFC 3986 -- latest standard (URI syntax)
RFC 1738 -- standard (absolute URLs)
Official IANA URI schemes
It's just that the only place to my mind that // should occur is after
the protocol colon.