我有以下 .htaccess 文件
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^css/.*$ - [PT]
RewriteRule ^flash/.*$ - [PT]
RewriteRule ^images/user-images/(.*)$ /index.php?image=$1 [QSA]
RewriteRule ^inc/.*$ - [PT]
RewriteRule ^js/.*$ - [PT]
RewriteRule ^swf/.*$ - [PT]
我需要调整其中一行来接受和维护查询变量
RewriteRule ^images/user-images/(.*)$ /index.php?image=$1 [QSA]
这是的示例网址如下所示:
http://domain.com/images/user-images/Montreal/private/2012_08_10/YzAbCdE.jpg?lang=fr
lang 变量总是被剥离我如何仍然让上面的 url 工作并重定向到http://domain.com/images/user-images/Montreal/private/2012_08_10/YzAbCdE.jpg而不会丢失 lang=fr
谢谢你的帮助 :)