# Redirect non-www to www

# Create pretty URLs
# End: Create pretty URLs

# Specific redirections
if ($args ~* ^categoryID=87$){ rewrite ^/shop/index\.php$ /shop/index_categoryID-87.html? permanent; }
if ($args ~* ^categoryID=90$){ rewrite ^/shop/index\.php$ /shop/index_categoryID-90.html? permanent; }
if ($args ~* ^categoryID=91$){ rewrite ^/shop/index\.php$ /shop/index_categoryID-91.html? permanent; }
if ($args ~* ^killuser=yes$){ rewrite ^/shop/index\.php$ /shop/index_killuser-yes.html? permanent; }
if ($args ~* ^productID=221$){ rewrite ^/shop/index\.php$ /shop/index_productID-221.html? permanent; }
if ($args ~* ^productID=222$){ rewrite ^/shop/index\.php$ /shop/index_productID-222.html? permanent; }
if ($args ~* ^productID=223$){ rewrite ^/shop/index\.php$ /shop/index_productID-223.html? permanent; }
if ($args ~* ^productID=226$){ rewrite ^/shop/index\.php$ /shop/index_productID-226.html? permanent; }
if ($args ~* ^shopping_cart=yes$){ rewrite ^/shop/index\.php$ /shop/index_shopping_cart-yes.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
