将htaccess rewritecond转换为nginx
我对nginx很新,但是以前有过apacheredirect的经验。 我将一个子域名转换为一个子文件夹,并需要一些帮助,让我的重写规则正确的交换机。 子域托pipe在apache服务器上,新的子目录托pipe在我的新nginx服务器上。 下面是包含我所需的redirect的工作htaccess文件: Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^france-property\.frenchentree\.com$ [NC] RewriteCond %{QUERY_STRING} ^$ RewriteRule ^for-sale/(.*)$ http://www.frenchentree.com/property-for-sale/search/$1? [R=301,NE,NC,L] RewriteCond %{HTTP_HOST} ^france-property\.frenchentree\.com$ [NC] RewriteCond %{QUERY_STRING} ^$ RewriteRule ^for-sale$ http://www.frenchentree.com/property-for-sale/search? [R=301,NE,NC,L] RewriteCond %{HTTP_HOST} ^france-property\.frenchentree\.com$ [NC] RewriteCond %{QUERY_STRING} ^$ RewriteRule ^for-sale-details(.*) http://www.frenchentree.com/property-for-sale/details$1? [R=301,NE,NC,L] RewriteCond %{HTTP_HOST} ^france-property\.frenchentree\.com$ [NC] RewriteCond %{QUERY_STRING} ^$ RewriteRule ^buyer-registration(.*)$ http://www.frenchentree.com/property-for-sale/buyer-registration? [R=301,NE,NC,L] RewriteCond %{HTTP_HOST} ^france-property\.frenchentree\.com$ […]