# Create pretty URLs
# End: Create pretty URLs

# Specific redirections
if ($args ~* ^product=home$){ rewrite ^/estimate\.php$ /estimate_product-home.html? permanent; }
if ($args ~* ^product=awning$){ rewrite ^/estimate\.php$ /estimate_product-awning.html? permanent; }
if ($args ~* ^product=screens$){ rewrite ^/estimate\.php$ /estimate_product-screens.html? permanent; }
if ($args ~* ^product=pergola$){ rewrite ^/estimate\.php$ /estimate_product-pergola.html? permanent; }
if ($args ~* ^product=canopy$){ rewrite ^/estimate\.php$ /estimate_product-canopy.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
