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


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



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




Codeigniter $config['uri_protocol'] problem

1:



Help with 301 redirect (Simple concept, per directory control)
I got it fixed:.
Display content as root from subdomain
Added to apache2.conf (httpd.conf):.
how to remove url parameters in htaccess [closed]
RewriteMap escapemap int:escape 
.htaccess:.
.htaccess Subdomain Rewrite (not like other questions!)
Options +FollowSymLinks  RewriteEngine On   RewriteCond %{HTTPS} =on RewriteCond "%{HTTP_HOST}" "^live\.domain\.com" [NC] RewriteRule "(.*)$" "http://domain.com/api/${escapemap:$1}" [L,P] 
source: http://www.nabble.com/Re%3A-Re-users%40httpd--writeRule%2C--P--and-space-on-URL-p15632475.html.
.htaccess Conditional Redirect When Pattern Does Not Match


RewriteCond all domains white www


Adding far future Expires header to .ttf and .otf files

2:


What worked for me, without modifying the httpd file:.
RewriteRule ^(.+) http://domain.com/api/$1 [R=302,NC] 
Notice how the rule does not capture the end of the line..



90 out of 100 based on 50 user ratings 750 reviews

@