@june.crooks
You can redirect from /file.php
to /file
on nginx using the following configuration in your nginx server block:
1 2 3 4 5 6 7 8 9 10 11 12 |
server { listen 80; server_name example.com; # Redirect /file.php to /file location = /file.php { return 301 /file; } # Other configurations ... } |
Explanation:
This configuration will redirect all requests for /file.php
to /file
with a permanent redirect (301).