Lighttpd到nginx vhost reirte规则转换

时间:2015-09-08 10:15:43

标签: mod-rewrite nginx lighttpd

我有以下lighttpd重定向规则,需要将它们转换为nginx:

url.rewrite-once = (

   "^/misc(.*)" => "/misc$1",
   "^/show_fileupload.php(.*)" => "/show_fileupload.php$1",
   "^/flash(.*)" => "/flash$1",
   "^/images(.*)" => "/images$1",
   "^/css(.*)" => "/css$1",
   "^/js(.*)" => "/js$1",
   "^/filestore(.*)" => "/filestore$1",
   "/(([a-f0-9]{32})/)?(app/(.+?)/)(lang/(\w{2}-\w{2}|\w{2}|)/)?/*([^\?]*)(?:\?(.*))?" => "/$4.php?rs_module_uri=$7&rs_session=$2&rs_app=$4&rs_lang=$6&$8",
   "/(([a-f0-9]{32})/)?(app//)?(lang/(\w{2}-\w{2}|\w{2}|)/)?/*([^\?]*)(?:\?(.*))?" => "/main.php?rs_module_uri=$6&rs_session=$2&&rs_lang=$5&$7",

)

如何转换特别是最后两行?

0 个答案:

没有答案