Created
December 14, 2020 14:39
-
-
Save semihkeskindev/d1a86db5f54f75f74c42f5daeb80bb04 to your computer and use it in GitHub Desktop.
Nginx remove index.php
This file contains hidden or 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
if ($request_uri ~ "^(\/)index\.php$") { | |
return 302 $1; | |
} | |
if ($request_uri ~ "^(\/)index\.php\?(.*)") { | |
return 302 $1?$2; | |
} | |
if ($request_uri ~ "^(\/)index\.php\/(.*)") { | |
return 302 $1$2; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A few url examples that showing where will be redirected: