# Add a trailing slash (/) to a URL
rewrite ^([^.]*[^/])$ $1/ permanent;

# Specific redirections
rewrite ^/category/adult-chat-room-review/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /category/adult-chat-room-review/���_www.fapil/? permanent;
rewrite ^/category/charleston-free-escort-sites-2/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /category/charleston-free-escort-sites-2/���_www.fapil/? permanent;
rewrite ^/category/fabswingers-inceleme-visitors/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /category/fabswingers-inceleme-visitors/���_www.fapil/? permanent;
rewrite ^/category/mylol-de-review-2/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /category/mylol-de-review-2/���_www.fapil/? permanent;
rewrite ^/category/norwalk-escort-2/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /category/norwalk-escort-2/���_www.fapil/? permanent;
rewrite ^/dinner-specials/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /dinner-specials/���_www.fapil/? permanent;
rewrite ^/foodmenu/asparagus-broccolini/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/asparagus-broccolini/���_www.fapil/? permanent;
rewrite ^/foodmenu/baked-alaska/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/baked-alaska/���_www.fapil/? permanent;
rewrite ^/foodmenu/black-augus-8-aunce-club-sirlion/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/black-augus-8-aunce-club-sirlion/���_www.fapil/? permanent;
rewrite ^/foodmenu/bouillabaisse-a-la-marseilles/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/bouillabaisse-a-la-marseilles/���_www.fapil/? permanent;
rewrite ^/foodmenu/french-fried-onion-rings/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/french-fried-onion-rings/���_www.fapil/? permanent;
rewrite ^/foodmenu/glover-salad-2/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/glover-salad-2/���_www.fapil/? permanent;
rewrite ^/foodmenu/grilled-rosemary-breast-of-chicken/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/grilled-rosemary-breast-of-chicken/���_www.fapil/? permanent;
rewrite ^/foodmenu/homemade-lobster-ravioli/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/homemade-lobster-ravioli/���_www.fapil/? permanent;
rewrite ^/foodmenu/lobster-ala-hawthorne/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/lobster-ala-hawthorne/���_www.fapil/? permanent;
rewrite ^/foodmenu/margherita-pizza/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/margherita-pizza/���_www.fapil/? permanent;
rewrite ^/foodmenu/muscat-1994/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/muscat-1994/���_www.fapil/? permanent;
rewrite ^/foodmenu/our-famous-popovers/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/our-famous-popovers/���_www.fapil/? permanent;
rewrite ^/foodmenu/pier-4-ice-cream-pie-2/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/pier-4-ice-cream-pie-2/���_www.fapil/? permanent;
rewrite ^/foodmenu/sauteed-dover-sole-2/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/sauteed-dover-sole-2/���_www.fapil/? permanent;
rewrite ^/foodmenu/swordfish/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /foodmenu/swordfish/���_www.fapil/? permanent;
rewrite ^/gallery-linked/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /gallery-linked/���_www.fapil/? permanent;
rewrite ^/gallery/microwave-chicken-steak-gallery/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /gallery/microwave-chicken-steak-gallery/���_www.fapil/? permanent;
rewrite ^/gallery/tossed-salad-gallery/%EF%BF%BD%EF%BF%BD%EF%BF%BDhttps\:/www\.fapil\.fr$ /gallery/tossed-salad-gallery/���_www.fapil/? permanent;
if ($args ~* ^History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=1&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-1-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=10&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-10-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=11&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-11-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=12&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-12-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=13&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-13-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=14&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-14-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=15&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-15-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=16&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-16-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=2&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-2-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=3&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-3-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=4&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-4-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=5&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-5-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=6&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-6-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=7&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-7-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=8&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-8-History_Category-Celebrities/? permanent; }
if ($args ~* ^PageNum_GetPhotos=9&History_Category=Celebrities$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-9-History_Category-Celebrities/? permanent; }
if ($args ~* ^History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_History_Category-Politicians/? permanent; }
if ($args ~* ^PageNum_GetPhotos=1&History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-1-History_Category-Politicians/? permanent; }
if ($args ~* ^PageNum_GetPhotos=2&History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-2-History_Category-Politicians/? permanent; }
if ($args ~* ^PageNum_GetPhotos=3&History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-3-History_Category-Politicians/? permanent; }
if ($args ~* ^PageNum_GetPhotos=4&History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-4-History_Category-Politicians/? permanent; }
if ($args ~* ^PageNum_GetPhotos=5&History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-5-History_Category-Politicians/? permanent; }
if ($args ~* ^PageNum_GetPhotos=6&History_Category=Politicians$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-6-History_Category-Politicians/? permanent; }
if ($args ~* ^History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=1&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-1-History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=2&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-2-History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=3&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-3-History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=4&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-4-History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=5&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-5-History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=6&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-6-History_Category-Presidents/? permanent; }
if ($args ~* ^PageNum_GetPhotos=7&History_Category=Presidents$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-7-History_Category-Presidents/? permanent; }
if ($args ~* ^History_Category=Sports\%20Figures$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_History_Category-SportsFigures/? permanent; }
if ($args ~* ^PageNum_GetPhotos=1&History_Category=Sports\%20Figures$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-1-History_Category-SportsFigures/? permanent; }
if ($args ~* ^PageNum_GetPhotos=2&History_Category=Sports\%20Figures$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-2-History_Category-SportsFigures/? permanent; }
if ($args ~* ^PageNum_GetPhotos=3&History_Category=Sports\%20Figures$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-3-History_Category-SportsFigures/? permanent; }
if ($args ~* ^PageNum_GetPhotos=4&History_Category=Sports\%20Figures$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-4-History_Category-SportsFigures/? permanent; }
if ($args ~* ^PageNum_GetPhotos=5&History_Category=Sports\%20Figures$){ rewrite ^/history/history-gallery\.cfm$ /history/history-gallery_PageNum_GetPhotos-5-History_Category-SportsFigures/? permanent; }
rewrite ^/kogda-vam-obozhaete-provodit-epokha-iz-za-litsami-igrovykh-avtomatov-i-umeete-vulkan-russia-ofitsialnyi-sait-zabavliatsia-na-tseluiu-ulitku-tak-vo-kazino-igornyi-dom-stanete-chuvstvovat-sebia-kak-ryb$ /files/tvovat-sebia-kak-ryb_y7pavibp525wn065tbhj7a/? permanent;
rewrite ^/menu/\.\./menu/lunch\.cfm$ /menu/lunch/? 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
