# Redirect non-www to www # Add a trailing slash (/) to a URL rewrite ^([^.]*[^/])$ $1/ permanent; # Specific redirections if ($args ~* ^smd_process_download=1&download_id=4240$){ rewrite ^//?$ /smd_process_download-1-download_id-4240/? permanent; } if ($args ~* ^p=21060$){ rewrite ^//?$ /p-21060/? permanent; } if ($args ~* ^s=\%7Bsearch_term_string\%7D$){ rewrite ^//?$ /s-{search_term_string}/? permanent; } if ($args ~* ^redirect_to=https\%3A\%2F\%2Fwww\.buscopng\.com\%2Fwp-admin\%2Fauthorize-application\.php$){ rewrite ^/ingresar/?$ /wp-admin/authorize-application/? permanent; } if ($args ~* ^id=a6105c0a611b41b08f1209506350279e&ts=1750089587&wsidchk=12753002&pdata=https\%253A\%252F\%252Fwww\.buscopng\.com&failedChecks=zeroOuterDimensions$){ rewrite ^/z0f76a1d14fd21a8fb5fd0d03e0fdc3d3cedae52f/?$ /-failedChecks-zeroOuterDimensions/? 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