Created
May 18, 2023 14:22
-
-
Save isjwuk/8480669a383f5ea894a00a2b677446a2 to your computer and use it in GitHub Desktop.
Nginx Web Server config to redirect subpage to subpage.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Redirect example.com/subpage1 to example.com/subpage1.html, example.com/subpage2 to example.com/subpage2.html | |
#And so on | |
#Snippet from the nginx config file | |
#Tested in an Azure PHP WebApp | |
#Redirect /page to /page.html | |
location / { | |
try_files $uri $uri/index.html $uri/index.php $uri.html $uri/ ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment