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

# Specific redirections
if ($args ~* ^add_to_wishlist=13768&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13768-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13767&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13767-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13742&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13742-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13741&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13741-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=301&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-301-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13694&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13694-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13695&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13695-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13697&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13697-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=55&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-55-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13699&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13699-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13696&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13696-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13707&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13707-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=226&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-226-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=228&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-228-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13702&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13702-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13705&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13705-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=277&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-277-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=119&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-119-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13701&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13701-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=11717&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-11717-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13693&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13693-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13704&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13704-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=184&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-184-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13706&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13706-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13700&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13700-_wpnonce-c90d609a11/? permanent; }
if ($args ~* ^add_to_wishlist=13688&_wpnonce=c90d609a11$){ rewrite ^//?$ /add_to_wishlist-13688-_wpnonce-c90d609a11/? 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
