.htaccess URL is being cut at a space (I'm using Codeigniter)

Posted by Ice on Stack Overflow See other posts from Stack Overflow or by Ice
Published on 2009-01-02T14:14:19Z Indexed on 2010/04/20 7:03 UTC
Read the original article Hit count: 254

I've used the following code to map https://live.example.com on to http://example.com/api

Options +FollowSymLinks

RewriteEngine On 

RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^live\.example\.com [NC]
RewriteRule (.+)$ "http://example.com/api/$1" [L,P]

The following url:

https://live.example.com/userlinks/xml/John%20James/MvPjeUTo15/

Is suppose to map onto:

http://example.com/api/userlinks/xml/John%20James/MvPjeUTo15/

Instead it maps it to:

http://example.com/api/userlinks/xml/John

So it seems to cut it at the space. I am using the Codeigniter framework but I am not sure if the problem lies there.

Also using %20 or just a space in the url bar produces no different results.

Anyone any idea and/or solution why this happens?

Thank you very much,

Ice

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about mod-rewrite