能帮忙看下如下apache规则用nginx怎么实现吗?
RewriteRule ^([^.]+)\.xiao\.com/(.*)$ http://haha.xiao.com/$1/$2
我这样写的 但是没效果出现404了
location/(.*) {
if ( $uri ~ "(.*)" ) {
set $uri_var $1;
}
if ( $host ~ "([^.]+)\.xiao\.com" ) {
set $host_var $1;
}
proxy_pass http://haha.xiao.com/$host_var/$uri_var;
}
页:
[1]