我使用以下代码将https://live.example.com映射到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]
以下网址:
https://live.example.com/userlinks/xml/John%20James/MvPjeUTo15/
假设映射到:
http://example.com/api/userlinks/xml/John%20James/MvPjeUTo15/
相反,它将其映射到:
http://example.com/api/userlinks/xml/John
所以它似乎在空间上削减它。我正在使用 Codeigniter 框架,但我不确定问题是否存在。
在 url 栏中使用%20
或仅使用空格不会产生不同的结果。
任何人有任何想法和/或解决方案为什么会发生这种情况?
非常感谢,
冰