iqb*_*lmp 4 apache .htaccess webserver fastcgi nginx
我的Apache网站下面有.htaccess设置; 现在我把它移到Nginx.因此,我想知道如何将.htaccess文件中的'SetEnvIf'参数放在Nginx configuraiton下?我认为通过设置'fastcgi_param',请帮我进行转换.
SetEnvIf HOST albany\.mywebsite\.com MAGE_RUN_CODE=w2760
SetEnvIf HOST albany\.mywebsite\.com MAGE_RUN_TYPE=website
SetEnvIf HOST alexandria\.mywebsite\.com MAGE_RUN_CODE=w1472
SetEnvIf HOST alexandria\.mywebsite\.com MAGE_RUN_TYPE=website
SetEnvIf HOST annarbor\.mywebsite\.com MAGE_RUN_CODE=w2933
SetEnvIf HOST annarbor\.mywebsite\.com MAGE_RUN_TYPE=website
谢谢.
你可以这样做:
if ($host = albany.mywebsite.com) {
  env MAGE_RUN_CODE=w2769;
  env $MAGE_RUN_TYPE=website;
}
(等等其他主机值)
见http://nginx.org/en/docs/ngx_core_module.html#env
| 归档时间: | 
 | 
| 查看次数: | 3153 次 | 
| 最近记录: |