# Specific redirections
if ($args ~* ^dizayn=01$){ rewrite ^/$ /dizayn-01? permanent; }
if ($args ~* ^dizayn=02$){ rewrite ^/$ /dizayn-02? permanent; }
if ($args ~* ^dizayn=03$){ rewrite ^/$ /dizayn-03? permanent; }
if ($args ~* ^dizayn=04$){ rewrite ^/$ /dizayn-04? permanent; }
if ($args ~* ^dizayn=05&kid=17$){ rewrite ^/$ /dizayn-05-kid-17? permanent; }
if ($args ~* ^dizayn=05&kid=23$){ rewrite ^/$ /dizayn-05-kid-23? permanent; }
if ($args ~* ^dizayn=05&kid=25$){ rewrite ^/$ /dizayn-05-kid-25? permanent; }
if ($args ~* ^dizayn=05&kid=31$){ rewrite ^/$ /dizayn-05-kid-31? permanent; }
if ($args ~* ^dizayn=05&kid=27$){ rewrite ^/$ /dizayn-05-kid-27? permanent; }
if ($args ~* ^dizayn=05&kid=15$){ rewrite ^/$ /dizayn-05-kid-15? permanent; }
if ($args ~* ^dizayn=05&kid=29$){ rewrite ^/$ /dizayn-05-kid-29? permanent; }
if ($args ~* ^dizayn=05&kid=24$){ rewrite ^/$ /dizayn-05-kid-24? permanent; }
if ($args ~* ^dizayn=05&kid=30$){ rewrite ^/$ /dizayn-05-kid-30? permanent; }
if ($args ~* ^dizayn=05&kid=28$){ rewrite ^/$ /dizayn-05-kid-28? permanent; }
if ($args ~* ^dizayn=06&yd=detay&id=16$){ rewrite ^/$ /dizayn-06-yd-detay-id-16? permanent; }
if ($args ~* ^dizayn=06&yd=tum$){ rewrite ^/$ /dizayn-06-yd-tum? permanent; }
if ($args ~* ^dizayn=06&yd=detay&id=12$){ rewrite ^/$ /dizayn-06-yd-detay-id-12? permanent; }
if ($args ~* ^dizayn=01$){ rewrite ^/default\.asp$ /default.asp/dizayn-01? permanent; }
if ($args ~* ^dizayn=02$){ rewrite ^/default\.asp$ /default.asp/dizayn-02? permanent; }
if ($args ~* ^dizayn=03$){ rewrite ^/default\.asp$ /default.asp/dizayn-03? permanent; }
if ($args ~* ^dizayn=04$){ rewrite ^/default\.asp$ /default.asp/dizayn-04? permanent; }
if ($args ~* ^dizayn=05&kid=17$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-17? permanent; }
if ($args ~* ^dizayn=05&kid=23$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-23? permanent; }
if ($args ~* ^dizayn=05&kid=25$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-25? permanent; }
if ($args ~* ^dizayn=05&kid=31$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-31? permanent; }
if ($args ~* ^dizayn=05&kid=27$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-27? permanent; }
if ($args ~* ^dizayn=05&kid=15$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-15? permanent; }
if ($args ~* ^dizayn=05&kid=29$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-29? permanent; }
if ($args ~* ^dizayn=05&kid=24$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-24? permanent; }
if ($args ~* ^dizayn=05&kid=30$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-30? permanent; }
if ($args ~* ^dizayn=05&kid=28$){ rewrite ^/default\.asp$ /default.asp/dizayn-05-kid-28? permanent; }
if ($args ~* ^dizayn=06&yd=detay&id=16$){ rewrite ^/default\.asp$ /default.asp/dizayn-06-yd-detay-id-16? permanent; }
if ($args ~* ^dizayn=06&yd=tum$){ rewrite ^/default\.asp$ /default.asp/dizayn-06-yd-tum? permanent; }
if ($args ~* ^dizayn=06&yd=detay&id=12$){ rewrite ^/default\.asp$ /default.asp/dizayn-06-yd-detay-id-12? permanent; }

# Create pretty URLs
rewrite ^/([^/]+)$ /$1.html last;
rewrite ^/([^/]+)/([^/]+)$ /$1/$2.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8/$9.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8/$9/$10.html last;
# End: Create pretty URLs

# 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
