# Redirect non-www to www

# Specific redirections
if ($args ~* ^start=10$){ rewrite ^/beta3/community$ /beta3/community_start-10? permanent; }
if ($args ~* ^start=15$){ rewrite ^/beta3/community$ /beta3/community_start-15? permanent; }
if ($args ~* ^start=20$){ rewrite ^/beta3/community$ /beta3/community_start-20? permanent; }
if ($args ~* ^start=5$){ rewrite ^/beta3/community$ /beta3/community_start-5? permanent; }
if ($args ~* ^start=8$){ rewrite ^/beta3/school/about$ /beta3/school/about_start-8? permanent; }
if ($args ~* ^start=20$){ rewrite ^/beta3/school$ /beta3/school_start-20? permanent; }
if ($args ~* ^start=10$){ rewrite ^/community$ /community_start-10? permanent; }
if ($args ~* ^start=15$){ rewrite ^/community$ /community_start-15? permanent; }
if ($args ~* ^start=20$){ rewrite ^/community$ /community_start-20? permanent; }
if ($args ~* ^start=5$){ rewrite ^/community$ /community_start-5? permanent; }
if ($args ~* ^tmpl=component&link=083fd3721aff7609e251e01f118b1ba9863fac4c$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-083fd3721aff7609e251e01f118b1ba9863fac4c? permanent; }
if ($args ~* ^tmpl=component&link=08adbd5c9a419d6578302f67e8a39b5148327e29$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-08adbd5c9a419d6578302f67e8a39b5148327e29? permanent; }
if ($args ~* ^tmpl=component&link=1a4c6baf35f5f32ceaa9f6cc3b713e3322f3aef1$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-1a4c6baf35f5f32ceaa9f6cc3b713e3322f3aef1? permanent; }
if ($args ~* ^tmpl=component&link=37cdb439e1853f40491ca683671c504edd30626c$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-37cdb439e1853f40491ca683671c504edd30626c? permanent; }
if ($args ~* ^tmpl=component&link=37d573661eaee43117e849e158b71b8c5c6455b6$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-37d573661eaee43117e849e158b71b8c5c6455b6? permanent; }
if ($args ~* ^tmpl=component&link=556952f12a2b7659908a2d910485f029087951d6$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-556952f12a2b7659908a2d910485f029087951d6? permanent; }
if ($args ~* ^tmpl=component&link=698ff9ef438d7b1963a361cc73061cea2ad25507$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-698ff9ef438d7b1963a361cc73061cea2ad25507? permanent; }
if ($args ~* ^tmpl=component&link=6b5bef1384cddf6c29b610ffad29119e2fac43a4$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-6b5bef1384cddf6c29b610ffad29119e2fac43a4? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9zY2hvb2wvMjUtYWJvdXQvNDktZmFjdHM\%3D$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9zY2hvb2wvMjUtYWJvdXQvNDktZmFjdHM? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9zY2hvb2wvMjUtYWJvdXQvNjItYXBwbGljYXRpb24tcHJvY2Vzcw\%3D\%3D$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9zY2hvb2wvMjUtYWJvdXQvNjItYXBwbGljYXRpb24tcHJvY2Vzcw? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9zY2hvb2wvMjUtYWJvdXQvNTAtc3R1ZGVudC1jbHVicw\%3D\%3D$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9zY2hvb2wvMjUtYWJvdXQvNTAtc3R1ZGVudC1jbHVicw? permanent; }
if ($args ~* ^tmpl=component&link=b5b323a617ecad97b1da32d9d3730dffedabe6d9$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-b5b323a617ecad97b1da32d9d3730dffedabe6d9? permanent; }
if ($args ~* ^tmpl=component&link=cd9ef84595e0ea646b0e641906be34fac63a8083$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-cd9ef84595e0ea646b0e641906be34fac63a8083? permanent; }
if ($args ~* ^tmpl=component&link=eacfc80ccbe49de80b5599d7257292beaeda78ff$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-eacfc80ccbe49de80b5599d7257292beaeda78ff? permanent; }
if ($args ~* ^start=5$){ rewrite ^/en/community/partners$ /en/community/partners_start-5? permanent; }
if ($args ~* ^start=10$){ rewrite ^/en/community$ /en/community_start-10? permanent; }
if ($args ~* ^start=15$){ rewrite ^/en/community$ /en/community_start-15? permanent; }
if ($args ~* ^start=20$){ rewrite ^/en/community$ /en/community_start-20? permanent; }
if ($args ~* ^start=5$){ rewrite ^/en/community$ /en/community_start-5? permanent; }
if ($args ~* ^start=8$){ rewrite ^/en/school/about$ /en/school/about_start-8? permanent; }
if ($args ~* ^start=10$){ rewrite ^/en/school/advisories-staff$ /en/school/advisories-staff_start-10? permanent; }
if ($args ~* ^start=5$){ rewrite ^/en/school/advisories-staff$ /en/school/advisories-staff_start-5? permanent; }
if ($args ~* ^start=5$){ rewrite ^/en/school/senior-projects$ /en/school/senior-projects_start-5? permanent; }
if ($args ~* ^start=20$){ rewrite ^/en/school$ /en/school_start-20? permanent; }
if ($args ~* ^start=10$){ rewrite ^/en/updates$ /en/updates_start-10? permanent; }
if ($args ~* ^start=15$){ rewrite ^/en/updates$ /en/updates_start-15? permanent; }
if ($args ~* ^start=20$){ rewrite ^/en/updates$ /en/updates_start-20? permanent; }
if ($args ~* ^start=25$){ rewrite ^/en/updates$ /en/updates_start-25? permanent; }
if ($args ~* ^start=5$){ rewrite ^/en/updates$ /en/updates_start-5? permanent; }
if ($args ~* ^KeepThis=true&TB_iframe=true&height=400&width=600$){ rewrite ^/includes/donate_to_us\.php$ /includes/donate_to_us_KeepThis-true-TB_iframe-true-height-400-width-600? permanent; }
if ($args ~* ^KeepThis=true&TB_iframe=true&height=180&width=250$){ rewrite ^/includes/rate_us\.php$ /includes/rate_us_KeepThis-true-TB_iframe-true-height-180-width-250? permanent; }
if ($args ~* ^KeepThis=true&TB_iframe=true&height=550&width=535$){ rewrite ^/includes/send_to_a_friend\.php$ /includes/send_to_a_friend_KeepThis-true-TB_iframe-true-height-550-width-535? permanent; }
if($is_args = ''){ rewrite ^/index\.php$ /index_php? permanent; }
rewrite ^/index\.php/about$ /index_php/about? permanent;
rewrite ^/index\.php/about-us$ /index_php/about-us? permanent;
rewrite ^/index\.php/about/about-the-met$ /index_php/about/about-the-met? permanent;
rewrite ^/index\.php/about/history$ /index_php/about/history? permanent;
rewrite ^/index\.php/about/staff-2$ /index_php/about/staff-2? permanent;
rewrite ^/index\.php/about/staff-2/item/295-vince-wolfe$ /index_php/about/staff-2/item/295-vince-wolfe? permanent;
rewrite ^/index\.php/about/staff-2/item/296-philip-rosoff$ /index_php/about/staff-2/item/296-philip-rosoff? permanent;
rewrite ^/index\.php/about/staff-2/item/297-victoria-lemus$ /index_php/about/staff-2/item/297-victoria-lemus? permanent;
rewrite ^/index\.php/about/staff-2/item/298-patrick-reilly$ /index_php/about/staff-2/item/298-patrick-reilly? permanent;
rewrite ^/index\.php/about/staff-2/item/299-christopher-chu$ /index_php/about/staff-2/item/299-christopher-chu? permanent;
rewrite ^/index\.php/about/staff-2/item/300-monica-hunt$ /index_php/about/staff-2/item/300-monica-hunt? permanent;
rewrite ^/index\.php/about/staff-2/item/304-cressie-ross$ /index_php/about/staff-2/item/304-cressie-ross? permanent;
rewrite ^/index\.php/about/staff-2/item/305-eliazar-de-la-cruz$ /index_php/about/staff-2/item/305-eliazar-de-la-cruz? permanent;
rewrite ^/index\.php/about/staff-2/item/306-grace-yates$ /index_php/about/staff-2/item/306-grace-yates? permanent;
rewrite ^/index\.php/about/staff-2/item/307-pamela-patterson$ /index_php/about/staff-2/item/307-pamela-patterson? permanent;
rewrite ^/index\.php/about/staff-2/item/309-xico-gonzalez$ /index_php/about/staff-2/item/309-xico-gonzalez? permanent;
rewrite ^/index\.php/about/staff-2/item/310-mac-mcwhorter$ /index_php/about/staff-2/item/310-mac-mcwhorter? permanent;
rewrite ^/index\.php/about/staff-2/item/311-kerry-hernandez$ /index_php/about/staff-2/item/311-kerry-hernandez? permanent;
rewrite ^/index\.php/about/staff-2/item/312-peter-flores$ /index_php/about/staff-2/item/312-peter-flores? permanent;
rewrite ^/index\.php/about/staff-2/item/313-rich-bennett$ /index_php/about/staff-2/item/313-rich-bennett? permanent;
rewrite ^/index\.php/about/staff-2/item/314-avis-howard$ /index_php/about/staff-2/item/314-avis-howard? permanent;
rewrite ^/index\.php/about/staff-2/item/315-priya-jaggi$ /index_php/about/staff-2/item/315-priya-jaggi? permanent;
rewrite ^/index\.php/about/staff-2/item/316-scott-ford$ /index_php/about/staff-2/item/316-scott-ford? permanent;
rewrite ^/index\.php/about/staff-2/item/320-manuel-favela$ /index_php/about/staff-2/item/320-manuel-favela? permanent;
rewrite ^/index\.php/about/staff-2/item/321-josue-guzman$ /index_php/about/staff-2/item/321-josue-guzman? permanent;
rewrite ^/index\.php/calendar$ /index_php/calendar? permanent;
rewrite ^/index\.php/calendar/2-uncategorised$ /index_php/calendar/2-uncategorised? permanent;
rewrite ^/index\.php/component/k2/itemlist/search$ /index_php/component/k2/itemlist/search? permanent;
if ($args ~* ^tmpl=component&template=gk_university&link=099d461f9e2c4b246495f2e9021f137db9152684$){ rewrite ^/index\.php/component/mailto$ /index_php/component/mailto/tmpl-component-template-gk_university-link-099d461f9e2c4b246495f2e9021f137db9152684? permanent; }
if ($args ~* ^tmpl=component&template=gk_university&link=0f6f5813b77ea22cf5a59a8f1f20a2abafb11481$){ rewrite ^/index\.php/component/mailto$ /index_php/component/mailto/tmpl-component-template-gk_university-link-0f6f5813b77ea22cf5a59a8f1f20a2abafb11481? permanent; }
rewrite ^/index\.php/component/users$ /index_php/component/users? permanent;
if ($args ~* ^view=remind$){ rewrite ^/index\.php/component/users$ /index_php/component/users/view-remind? permanent; }
if ($args ~* ^view=reset$){ rewrite ^/index\.php/component/users$ /index_php/component/users/view-reset? permanent; }
rewrite ^/index\.php/history$ /index_php/history? permanent;
rewrite ^/index\.php/how-to-apply$ /index_php/how-to-apply? permanent;
rewrite ^/index\.php/how-to-apply/37-about$ /index_php/how-to-apply/37-about? permanent;
rewrite ^/index\.php/news$ /index_php/news? permanent;
rewrite ^/index\.php/news/itemlist/search$ /index_php/news/itemlist/search? permanent;
rewrite ^/index\.php/news/latest$ /index_php/news/latest? permanent;
rewrite ^/index\.php/staff$ /index_php/staff? permanent;
if ($args ~* ^option=com_k2&view=itemlist&task=calendar&month=11&year=2016&Itemid=671$){ rewrite ^/index\.php$ /index_option-com_k2-view-itemlist-task-calendar-month-11-year-2016-Itemid-671? permanent; }
if ($args ~* ^option=com_k2&view=itemlist&task=calendar&month=5&year=2016&Itemid=671$){ rewrite ^/index\.php$ /index_option-com_k2-view-itemlist-task-calendar-month-5-year-2016-Itemid-671? permanent; }
if ($args ~* ^option=com_k2&view=itemlist&task=calendar&month=7&year=2016&Itemid=671$){ rewrite ^/index\.php$ /index_option-com_k2-view-itemlist-task-calendar-month-7-year-2016-Itemid-671? permanent; }
if ($args ~* ^option=com_k2&view=itemlist&task=calendar&month=9&year=2016&Itemid=671$){ rewrite ^/index\.php$ /index_option-com_k2-view-itemlist-task-calendar-month-9-year-2016-Itemid-671? permanent; }
if ($args ~* ^option=com_users&view=registration$){ rewrite ^/index\.php$ /index_option-com_users-view-registration? permanent; }
if ($args ~* ^start=10$){ rewrite ^/index\.php$ /index_start-10? permanent; }
if ($args ~* ^start=5$){ rewrite ^/index\.php$ /index_start-5? permanent; }
if ($args ~* ^showall=1$){ rewrite ^/internships/34-how-we-educate/56-learning-goals$ /internships/34-how-we-educate/56-learning-goals_showall-1? permanent; }
if ($args ~* ^start=1$){ rewrite ^/internships/34-how-we-educate/56-learning-goals$ /internships/34-how-we-educate/56-learning-goals_start-1? permanent; }
if ($args ~* ^start=2$){ rewrite ^/internships/34-how-we-educate/56-learning-goals$ /internships/34-how-we-educate/56-learning-goals_start-2? permanent; }
if ($args ~* ^start=3$){ rewrite ^/internships/34-how-we-educate/56-learning-goals$ /internships/34-how-we-educate/56-learning-goals_start-3? permanent; }
if ($args ~* ^start=4$){ rewrite ^/internships/34-how-we-educate/56-learning-goals$ /internships/34-how-we-educate/56-learning-goals_start-4? permanent; }
if ($args ~* ^start=5$){ rewrite ^/internships/34-how-we-educate/56-learning-goals$ /internships/34-how-we-educate/56-learning-goals_start-5? permanent; }
if ($args ~* ^start=8$){ rewrite ^/school/about$ /school/about_start-8? permanent; }
if ($args ~* ^start=10$){ rewrite ^/school/advisories-staff$ /school/advisories-staff_start-10? permanent; }
if ($args ~* ^start=5$){ rewrite ^/school/advisories-staff$ /school/advisories-staff_start-5? permanent; }
if ($args ~* ^start=20$){ rewrite ^/school$ /school_start-20? permanent; }
if ($args ~* ^start=5$){ rewrite ^/updates/120-stp$ /updates/120-stp_start-5? permanent; }
if ($args ~* ^start=10$){ rewrite ^/updates$ /updates_start-10? permanent; }
if ($args ~* ^start=15$){ rewrite ^/updates$ /updates_start-15? permanent; }
if ($args ~* ^start=20$){ rewrite ^/updates$ /updates_start-20? permanent; }
if ($args ~* ^start=25$){ rewrite ^/updates$ /updates_start-25? permanent; }
if ($args ~* ^start=5$){ rewrite ^/updates$ /updates_start-5? permanent; }
if ($args ~* ^start=5$){ rewrite ^/es/comunidad$ /es/comunidad_start-5? permanent; }
if ($args ~* ^start=10$){ rewrite ^/es/comunidad$ /es/comunidad_start-10? permanent; }
if ($args ~* ^start=15$){ rewrite ^/es/comunidad$ /es/comunidad_start-15? permanent; }
if ($args ~* ^start=5$){ rewrite ^/es/comunidad/socios$ /es/comunidad/socios_start-5? permanent; }
if ($args ~* ^start=10$){ rewrite ^/es/escuela$ /es/escuela_start-10? permanent; }
if ($args ~* ^start=20$){ rewrite ^/es/escuela$ /es/escuela_start-20? permanent; }
if ($args ~* ^start=30$){ rewrite ^/es/escuela$ /es/escuela_start-30? permanent; }
if ($args ~* ^start=5$){ rewrite ^/es/escuela/asesorias-y-personal$ /es/escuela/asesorias-y-personal_start-5? permanent; }
if ($args ~* ^start=10$){ rewrite ^/es/escuela/asesorias-y-personal$ /es/escuela/asesorias-y-personal_start-10? permanent; }
if ($args ~* ^start=8$){ rewrite ^/es/escuela/sobre$ /es/escuela/sobre_start-8? permanent; }
if ($args ~* ^start=5$){ rewrite ^/es/noticias$ /es/noticias_start-5? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9ldmVudHMvMS1sYXRlc3QtbmV3cy8xMDItcm9hZC10cmlwLW5hdGlvbg\%3D\%3D$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9ldmVudHMvMS1sYXRlc3QtbmV3cy8xMDItcm9hZC10cmlwLW5hdGlvbg? permanent; }
if ($args ~* ^tmpl=component$){ rewrite ^/events/1-latest-news/102-road-trip-nation$ /events/1-latest-news/102-road-trip-nation_tmpl-component? permanent; }
if ($args ~* ^format=pdf$){ rewrite ^/events/1-latest-news/102-road-trip-nation$ /events/1-latest-news/102-road-trip-nation_format-pdf? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9ldmVudHMvMS1sYXRlc3QtbmV3cy8xMDktY29sbGVnZS11bmJvdW5kLXNuaHU\%3D$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9ldmVudHMvMS1sYXRlc3QtbmV3cy8xMDktY29sbGVnZS11bmJvdW5kLXNuaHU? permanent; }
if ($args ~* ^tmpl=component$){ rewrite ^/events/1-latest-news/109-college-unbound-snhu$ /events/1-latest-news/109-college-unbound-snhu_tmpl-component? permanent; }
if ($args ~* ^format=pdf$){ rewrite ^/events/1-latest-news/109-college-unbound-snhu$ /events/1-latest-news/109-college-unbound-snhu_format-pdf? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9ldmVudHMvMS1sYXRlc3QtbmV3cy8xMTItc3N1LWNvbGxlZ2UtbWFraW5nLWl0LWhhcHBlbi0yMDEx$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9ldmVudHMvMS1sYXRlc3QtbmV3cy8xMTItc3N1LWNvbGxlZ2UtbWFraW5nLWl0LWhhcHBlbi0yMDEx? permanent; }
if ($args ~* ^tmpl=component$){ rewrite ^/events/1-latest-news/112-ssu-college-making-it-happen-2011$ /events/1-latest-news/112-ssu-college-making-it-happen-2011_tmpl-component? permanent; }
if ($args ~* ^format=pdf$){ rewrite ^/events/1-latest-news/112-ssu-college-making-it-happen-2011$ /events/1-latest-news/112-ssu-college-making-it-happen-2011_format-pdf? permanent; }
if ($args ~* ^tmpl=component&link=aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9wdWJsaWMtY2FsZW5kYXI\%3D$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-aHR0cDovL3d3dy5tZXRzYWNyYW1lbnRvLm9yZy9wdWJsaWMtY2FsZW5kYXI? permanent; }
if ($args ~* ^tmpl=component$){ rewrite ^/events/35-events/87-public-events-calendar$ /events/35-events/87-public-events-calendar_tmpl-component? permanent; }
if ($args ~* ^format=pdf$){ rewrite ^/events/35-events/87-public-events-calendar$ /events/35-events/87-public-events-calendar_format-pdf? permanent; }
if ($args ~* ^tmpl=component&link=6947bdc2fc8535c9a9985ebceee937084a72a098$){ rewrite ^/component/mailto$ /component/mailto/tmpl-component-link-6947bdc2fc8535c9a9985ebceee937084a72a098? permanent; }
if ($args ~* ^tmpl=component$){ rewrite ^/families/36-community/156-paries-jammie-win$ /families/36-community/156-paries-jammie-win_tmpl-component? permanent; }
if ($args ~* ^format=pdf$){ rewrite ^/families/36-community/156-paries-jammie-win$ /families/36-community/156-paries-jammie-win_format-pdf? permanent; }
if ($args ~* ^tmpl=component$){ rewrite ^/families/36-community/179-metsters-move$ /families/36-community/179-metsters-move_tmpl-component? permanent; }
if ($args ~* ^format=pdf$){ rewrite ^/families/36-community/180-may-2012-is-bike-month$ /families/36-community/180-may-2012-is-bike-month_format-pdf? permanent; }
rewrite ^/beta17/index\.php/history-of-the-met$ /beta17/index_php/history-of-the-met? permanent;
rewrite ^/beta17/index\.php/staff$ /beta17/index_php/staff? permanent;
if ($args ~* ^format=feed$){ rewrite ^/index\.php/about/staff-2$ /index_php/about/staff-2_format-feed? 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
