Comment passer l’URL d’image en paramètre dans .htaccess

voici mon code .htaccess

Options all -Indexes  order allow,deny deny from all   Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^thumb/(.*)$ thumb.php?imagePath=$1 [B]  

Si je thumb.php?imagePath=image.1 http://img.zgserver.com/php/image1.jpg URL http://img.zgserver.com/php/image1.jpg elle est transmise à thumb.php?imagePath=image.1 et fonctionne thumb.php?imagePath=image.1 .

Supposons que si je saisis l’ http://mydomain.com/thumb/http://img.zgserver.com/php/image1.jpg URL http://mydomain.com/thumb/http://img.zgserver.com/php/image1.jpg

puis son erreur 404 montrant. Aidez-moi à régler ce problème

Et j’ai utilisé encodedurl aussi comme ça http://img.zgserver.com/php/404.html

Même chose, j’ai 404 erreur. S’il vous plaît, aidez-moi à régler ce problème.

Pour utiliser un paramètre avec http:// vous devez utiliser la capture de l’URI en utilisant la variable THE_REQUEST . Variable THE_REQUEST qui représente la demande d’origine reçue par Apache à partir de votre navigateur

Essayez cette règle:

 RewriteCond %{QUERY_STRING} ^$ RewriteCond %{THE_REQUEST} \s/+thumb/(\S+) [NC] RewriteRule ^ thumb.php?imagePath=%1 [B,L,NE] 

Pourquoi avez-vous ajouté un / à la fin de votre règle?

Essaye ça :

 Options all -Indexes  order allow,deny deny from all   Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^thumb/(.*)$ thumb.php?imagePath=$1 [B]