.htaccess 模式重写到lighttpd,AIS:自适应图像样式

a9wyjsp7  于 2022-11-16  发布在  其他
关注(0)|答案(1)|浏览(112)

我有以下.htaccess:

# AIS: Adaptive Image Style
  RewriteBase /
  RewriteCond %{REQUEST_URI} ^(.+)/files/styles/adaptive/(.+)$
  RewriteCond %{REQUEST_URI} !/modules/image/sample.png
  RewriteCond %{HTTP_COOKIE} ais=([a-z0-9-_]+)
  RewriteRule ^(.+)/files/styles/adaptive/(.+)$ $1/files/styles/%1/$2[R=302,L]

我怎样把它转换成lighttpd?

t3irkdon

t3irkdon1#

$HTTP["cookie"] =~ "ais=([a-z0-9-_]+)" {
  url.rewrite = ( "^(.+)/files/styles/adaptive/(.+)$" => "$1/files/styles/%1/$2" )
}

相关问题