# Create pretty URLs
# End: Create pretty URLs

# Specific redirections
if ($args ~* ^cy=2007&cm=8$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-8.html? permanent; }
if ($args ~* ^cy=2007&cm=9&f=y$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-f-y.html? permanent; }
if ($args ~* ^cy=2007&cm=10$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-10.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=9&ed=13&eID=1425$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-9-ed-13-eID-1425.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=9&ed=19&eID=0000000349$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-9-ed-19-eID-0000000349.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=10&ed=16&eID=0000000345$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-10-ed-16-eID-0000000345.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=10&ed=19&eID=0000000369$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-10-ed-19-eID-0000000369.html? permanent; }
if ($args ~* ^cy=2007&cm=9$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=9&ed=13$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-9-ed-13.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=9&ed=19$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-9-ed-19.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=10&ed=3$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-10-ed-3.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=10&ed=16$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-10-ed-16.html? permanent; }
if ($args ~* ^cy=2007&cm=9&ey=2007&em=10&ed=19$){ rewrite ^/events/calendar\.php$ /events/calendar_cy-2007-cm-9-ey-2007-em-10-ed-19.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
