# Redirect non-www to www

# Specific redirections
if ($args ~* ^itemId=1ha5n98tq15nqzacfi90h4ov1pux5u$){ rewrite ^/thecabin$ /thecabin/itemId-1ha5n98tq15nqzacfi90h4ov1pux5u? permanent; }
if ($args ~* ^itemId=63fj0ip0gir5l91ayxd44e1rtxc5qo$){ rewrite ^/thecabin$ /thecabin/itemId-63fj0ip0gir5l91ayxd44e1rtxc5qo? permanent; }
if ($args ~* ^itemId=t0c35kz6w6dj698mp1y28hobc3m23u$){ rewrite ^/thecabin$ /thecabin/itemId-t0c35kz6w6dj698mp1y28hobc3m23u? permanent; }
if ($args ~* ^itemId=h0nreysgoix3eyibrlpm0bslv1izt6$){ rewrite ^/thecabin$ /thecabin/itemId-h0nreysgoix3eyibrlpm0bslv1izt6? permanent; }
if ($args ~* ^itemId=4goniezmgcwnucxdlb35289n3os1rw$){ rewrite ^/thecabin$ /thecabin/itemId-4goniezmgcwnucxdlb35289n3os1rw? permanent; }
if ($args ~* ^itemId=d8krz2o9wn89vqofspwtrcugsqn4kk$){ rewrite ^/thecabin$ /thecabin/itemId-d8krz2o9wn89vqofspwtrcugsqn4kk? permanent; }
if ($args ~* ^itemId=8xe0e7kd3x1631n1pwn3vpifwy0gqp$){ rewrite ^/thecabin$ /thecabin/itemId-8xe0e7kd3x1631n1pwn3vpifwy0gqp? permanent; }
if ($args ~* ^itemId=o4dg52iq5ojoygseh59ro81h1j2svm$){ rewrite ^/thecabin$ /thecabin/itemId-o4dg52iq5ojoygseh59ro81h1j2svm? permanent; }
if ($args ~* ^itemId=uhxwbqg07nwqz3s3f1srf9nbetqdet$){ rewrite ^/thecabin$ /thecabin/itemId-uhxwbqg07nwqz3s3f1srf9nbetqdet? permanent; }
if ($args ~* ^itemId=z97jkcgkxihrusikiu7n0qnmaeeb27$){ rewrite ^/thecabin$ /thecabin/itemId-z97jkcgkxihrusikiu7n0qnmaeeb27? permanent; }
if ($args ~* ^itemId=l7jkcl0e7bimuffhdqbzgrce5xpszf$){ rewrite ^/thecabin$ /thecabin/itemId-l7jkcl0e7bimuffhdqbzgrce5xpszf? permanent; }
if ($args ~* ^itemId=a2k509lix9p5t7rrl1uf7xtuox7rai$){ rewrite ^/thecabin$ /thecabin/itemId-a2k509lix9p5t7rrl1uf7xtuox7rai? permanent; }
if ($args ~* ^itemId=59rwko1j4pvho36bx8jork56agapwt$){ rewrite ^/thecabin$ /thecabin/itemId-59rwko1j4pvho36bx8jork56agapwt? permanent; }
if ($args ~* ^itemId=kxo1nsbeege66i2peqhvh18u15m3xr$){ rewrite ^/thecabin$ /thecabin/itemId-kxo1nsbeege66i2peqhvh18u15m3xr? permanent; }
if ($args ~* ^itemId=58zoixlq11yn0jjimx21ncskls1mvn$){ rewrite ^/thecabin$ /thecabin/itemId-58zoixlq11yn0jjimx21ncskls1mvn? permanent; }
if ($args ~* ^itemId=zva8ilbt8ns3ve1tveqpst2gcvztno$){ rewrite ^/thecabin$ /thecabin/itemId-zva8ilbt8ns3ve1tveqpst2gcvztno? permanent; }
if ($args ~* ^itemId=d1ei8jadpzrtjn92q9zvjmsre5zeqe$){ rewrite ^/thecabin$ /thecabin/itemId-d1ei8jadpzrtjn92q9zvjmsre5zeqe? permanent; }
if ($args ~* ^itemId=b7dg9c32cepnb36kr75keloyjvr2w4$){ rewrite ^/thecabin$ /thecabin/itemId-b7dg9c32cepnb36kr75keloyjvr2w4? permanent; }
if ($args ~* ^itemId=ml7nmaon4b9qsdzazer7jp96vsm8u1$){ rewrite ^/thecabin$ /thecabin/itemId-ml7nmaon4b9qsdzazer7jp96vsm8u1? permanent; }
if ($args ~* ^itemId=8clof0csefa6ktif1jeeb8fc0whfq9$){ rewrite ^/thecabin$ /thecabin/itemId-8clof0csefa6ktif1jeeb8fc0whfq9? permanent; }
if ($args ~* ^itemId=60vw5rbpti67f9gfc5oac6cep21wts$){ rewrite ^/thecabin$ /thecabin/itemId-60vw5rbpti67f9gfc5oac6cep21wts? permanent; }
if ($args ~* ^itemId=z5qukmky8uskr9svzw239y30ehbdgn$){ rewrite ^/thecabin$ /thecabin/itemId-z5qukmky8uskr9svzw239y30ehbdgn? permanent; }
if ($args ~* ^itemId=k4lz2rgv81xj0qlvnizlcc4c5uq2si$){ rewrite ^/thecabin$ /thecabin/itemId-k4lz2rgv81xj0qlvnizlcc4c5uq2si? permanent; }
if ($args ~* ^itemId=8n5xhuakkesd23vsh3h5vxg91lrobz$){ rewrite ^/thecabin$ /thecabin/itemId-8n5xhuakkesd23vsh3h5vxg91lrobz? permanent; }
if ($args ~* ^itemId=nj8hyrf4ubf40h34sbq9ril2n9hbs9$){ rewrite ^/thecabin$ /thecabin/itemId-nj8hyrf4ubf40h34sbq9ril2n9hbs9? permanent; }
if ($args ~* ^itemId=p32bi7q9sz0bqhpo8bw558oiooo23t$){ rewrite ^/location$ /location/itemId-p32bi7q9sz0bqhpo8bw558oiooo23t? permanent; }
if ($args ~* ^itemId=bemqjh08pm87uvl9lt8uq2ray3qid3$){ rewrite ^/location$ /location/itemId-bemqjh08pm87uvl9lt8uq2ray3qid3? permanent; }
if ($args ~* ^itemId=3wt08u3f3a06woqyorukbhjmzo2iwj$){ rewrite ^/location$ /location/itemId-3wt08u3f3a06woqyorukbhjmzo2iwj? permanent; }
if ($args ~* ^itemId=463lsttemn2k5xt634q27g4m1pwka9$){ rewrite ^/location$ /location/itemId-463lsttemn2k5xt634q27g4m1pwka9? permanent; }
if ($args ~* ^itemId=16wiic9g5bi1djpb843au01val6h4f$){ rewrite ^/location$ /location/itemId-16wiic9g5bi1djpb843au01val6h4f? permanent; }
if ($args ~* ^itemId=rmi5glpygavkllpwrbln86otm1yvos$){ rewrite ^/location$ /location/itemId-rmi5glpygavkllpwrbln86otm1yvos? permanent; }
if ($args ~* ^itemId=g2pvb2uzsm0f4kqi5v9ue5ttn6bcjk$){ rewrite ^/location$ /location/itemId-g2pvb2uzsm0f4kqi5v9ue5ttn6bcjk? permanent; }
if ($args ~* ^itemId=7a106w3sznzyjw45q2n8m63ntf2kdt$){ rewrite ^/location$ /location/itemId-7a106w3sznzyjw45q2n8m63ntf2kdt? permanent; }
if ($args ~* ^itemId=wm45qo3vy2s4srmnal5y5r7203m3aj$){ rewrite ^/location$ /location/itemId-wm45qo3vy2s4srmnal5y5r7203m3aj? permanent; }
if ($args ~* ^itemId=d09w3v39hmtxtoi5ais02rydv9dkq8$){ rewrite ^/location$ /location/itemId-d09w3v39hmtxtoi5ais02rydv9dkq8? permanent; }
if ($args ~* ^itemId=ve3hi19ubtw285r21bjtispy4md1xy$){ rewrite ^/location$ /location/itemId-ve3hi19ubtw285r21bjtispy4md1xy? permanent; }
if ($args ~* ^itemId=582yn3dx5paje6m7ein3eu9admb654$){ rewrite ^/location$ /location/itemId-582yn3dx5paje6m7ein3eu9admb654? permanent; }
if ($args ~* ^itemId=jbz1m8srqqicw89wc73mbnsdvu3ooc$){ rewrite ^/location$ /location/itemId-jbz1m8srqqicw89wc73mbnsdvu3ooc? permanent; }
if ($args ~* ^itemId=998xmzaofugxtpbbfo7ih9r304vg3k$){ rewrite ^/location$ /location/itemId-998xmzaofugxtpbbfo7ih9r304vg3k? permanent; }
if ($args ~* ^itemId=izo93h57zjwnqpb3f298oy0l2nburs$){ rewrite ^/location$ /location/itemId-izo93h57zjwnqpb3f298oy0l2nburs? permanent; }
if ($args ~* ^itemId=l35h9kqvpkdlm9fnvr7w3st4citum5$){ rewrite ^/location$ /location/itemId-l35h9kqvpkdlm9fnvr7w3st4citum5? permanent; }
if ($args ~* ^itemId=c1yc0ypc2khrn4f8dspncw2y0161bo$){ rewrite ^/location$ /location/itemId-c1yc0ypc2khrn4f8dspncw2y0161bo? permanent; }
if ($args ~* ^itemId=bebbywjqbjizrs7hqyl9lq6bn56s7b$){ rewrite ^/location$ /location/itemId-bebbywjqbjizrs7hqyl9lq6bn56s7b? permanent; }
if ($args ~* ^itemId=ioygzmnov4gzlqqfi0bj0rjn2by7kx$){ rewrite ^/location$ /location/itemId-ioygzmnov4gzlqqfi0bj0rjn2by7kx? permanent; }
if ($args ~* ^itemId=6fzeb06umdcooa49fljxd1ntgg4xjh$){ rewrite ^/location$ /location/itemId-6fzeb06umdcooa49fljxd1ntgg4xjh? permanent; }
if ($args ~* ^itemId=w5h7hxzhiaohoqfur2cob8swe7952d$){ rewrite ^/location$ /location/itemId-w5h7hxzhiaohoqfur2cob8swe7952d? permanent; }
if ($args ~* ^itemId=5av31h0ix7l5at2qxbzi1uf75nrnks$){ rewrite ^/location$ /location/itemId-5av31h0ix7l5at2qxbzi1uf75nrnks? permanent; }
if ($args ~* ^itemId=xp265crpdp7a0pkbzfuima99mtph5a$){ rewrite ^/location$ /location/itemId-xp265crpdp7a0pkbzfuima99mtph5a? permanent; }
if ($args ~* ^itemId=c2990v4ulmdf4gfwv7wpf87ixfjlb0$){ rewrite ^/location$ /location/itemId-c2990v4ulmdf4gfwv7wpf87ixfjlb0? permanent; }
if ($args ~* ^itemId=0a8jwu9iwohsagmxhnezz5wv96y0z7$){ rewrite ^/location$ /location/itemId-0a8jwu9iwohsagmxhnezz5wv96y0z7? permanent; }
if ($args ~* ^itemId=xv46d3khj17liyeuvbpe02xnjo3m8u$){ rewrite ^/location$ /location/itemId-xv46d3khj17liyeuvbpe02xnjo3m8u? permanent; }
if ($args ~* ^itemId=dyht2zuxikw3f368pof0d2fozuohm9$){ rewrite ^/location$ /location/itemId-dyht2zuxikw3f368pof0d2fozuohm9? 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
