Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess htaccess和编码url_.htaccess_Url_Url Rewriting - Fatal编程技术网

.htaccess htaccess和编码url

.htaccess htaccess和编码url,.htaccess,url,url-rewriting,.htaccess,Url,Url Rewriting,我目前有: http://site.com/image/?x=100&y=70&image=https%3A%2F%2Fsite.com%2Fimage.jpg 我所有的yslow和google审计都告诉我,我不能代理缓存包含“?”的URL。因此,我正在更改它,以便htaccess可以将参数传递给我的动态图像获取程序,但无法找出htaccess。到目前为止,我已经: http://site.com/thumb/https%3A%2F%2Fsite.com%2Fimage.jpg 编辑,忘记了我目

我目前有:

http://site.com/image/?x=100&y=70&image=https%3A%2F%2Fsite.com%2Fimage.jpg

我所有的yslow和google审计都告诉我,我不能代理缓存包含“?”的URL。因此,我正在更改它,以便htaccess可以将参数传递给我的动态图像获取程序,但无法找出htaccess。到目前为止,我已经:

http://site.com/thumb/https%3A%2F%2Fsite.com%2Fimage.jpg

编辑,忘记了我目前的访问权限:

RewriteRule ^thumb/(.*)?$ image.php?a=image=$1&x=180y=70&cropratio=1:1&quality=70 [QSA,L]
我假设它是没有问号的b/c,浏览器认为它是两个URL拼凑在一起的,它不是参数

有什么想法吗

谢谢, 史蒂夫:你能试试吗

RewriteRule ^thumb/(.*)$ /image/?image=$1&x=180y=70&cropratio=1:1&quality=70 [QSA,L,NE,NC]
NE:此标志用于不编码原始文本 NC:用于忽略案例比较
谢谢阿努巴瓦。我一直在这样做,似乎这更像是一个PHP URL编码斜杠作为%2F而不是%252F的问题。我仍在试图找到一种不用编码就可以进行编码的好方法,然后必须进行字符串替换。