I want to use URLs like the followings :
http://mydomain.com/320x200/server/path/to/my/image.jpg
Where you can find 3 parameters to retrieve for rewriting :
320x200
: optional parameter, can be two numbers (like "320x200"), OR a single number (like "320x") OR empty (only "x")server
: required (this is a specific parameter to find a server where image is hosted, but does not really matter for this case)path/to/my/image.jpg
: required
and rewrite it with another domain like the followings :
http://myotherdomain.com/320/200/server/path/to/my/image.jpg
I tried the following rewrite rules but it is not working :
RewriteRule ^([0-9]+)x([0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9/.]+)$ htp://myotherdomain.com/$1/$2/$3/$4 [L]
RewriteRule ^([0-9]+)x/([a-zA-Z0-9]+)/([a-zA-Z0-9/.]+)$ htp://myotherdomain.com/$1/$2/$3 [L]
RewriteRule ^x/([a-zA-Z0-9]+)/([a-zA-Z0-9/.]+)$ htp://myotherdomain.com/$1/$2 [L]
Why is it not working ?
The 3 regex are working when tested through a website like regexplanet.com
I tried to clear browser cache, restart Apache, remove cookies, ... still not working !
Thanks for your help
Edit :
Finally, the problem was that my .htaccess file was not correctly saved (don't know why).
I just closed and opened the .htaccess again, everything ok !