# Redirect non-www to www

# Create pretty URLs
# End: Create pretty URLs

# Specific redirections
if ($args ~* ^mid=1302428&cid=0&url=https\%3A\%2F\%2Fprofessionali\.ru\%2F$){ rewrite ^/go-c-1302428\.html$ /go-c-1302428_mid-1302428-cid-0-url-https-professionali_ru.html? permanent; }
if ($args ~* ^mid=1302428&cid=-201&url=https\%3A\%2F\%2Fwww\.emma-sleep\.co\.uk\%2F&refer=https\%3A\%2F\%2Fwww\.promokudu\.com\%2Fpromokod\%2Fprofessionali\.ru&adv=1$){ rewrite ^/go-c--201\.html$ /promokod/professionali.ru-adv-1.html? permanent; }
if ($args ~* ^mid=60761&cid=0&url=https\%3A\%2F\%2Ffursk\.ru\%2F$){ rewrite ^/go-c-60761\.html$ /go-c-60761_mid-60761-cid-0-url-https-fursk_ru.html? permanent; }
if ($args ~* ^mid=60761&cid=-201&url=https\%3A\%2F\%2Fwww\.emma-sleep\.co\.uk\%2F&refer=https\%3A\%2F\%2Fwww\.promokudu\.com\%2Fpromokod\%2Ffursk\.ru&adv=1$){ rewrite ^/go-c--201\.html$ /promokod/fursk.ru-adv-1.html? permanent; }

# Redirect all extensions to html
if ($is_args = ''){
	rewrite ^([^.]*)\.shtml$ $1.html permanent;
	rewrite ^([^.]*)\.phtml$ $1.html permanent;
	rewrite ^([^.]*)\.jhtml$ $1.html permanent;
	rewrite ^([^.]*)\.htm$ $1.html permanent;
	rewrite ^([^.]*)\.php$ $1.html permanent;
	rewrite ^([^.]*)\.aspx$ $1.html permanent;
	rewrite ^([^.]*)\.asp$ $1.html permanent;
	rewrite ^([^.]*)\.jsp$ $1.html permanent;
	rewrite ^([^.]*)\.apk$ $1.html permanent;
}
# End: Redirect all extensions to html
