Closed iparr closed 7 years ago
Outside of scope
Have found a fix for items within a folder. Will share in case someone else is looking for a solution to what I'd imagine is a reasonably likely scenario:
location ~ /learn/.*\.php$ {
try_files $uri $uri/ /index.php?$query_string;
}
Then use Retour to set up a RegEx redirect:
/learn/(.+?)(\.[^.]*$|$)
-> /learn/$1
Where learn
is the name of the folder. Not bold enough to do this everywhere.
Although this commit is a much cleaner solution: https://github.com/nystudio107/nginx-craft/commit/65ad2868876c436f90ec80f0eee20fe9e3429607
I'm migrating from an old site with a lot of
.php
links littered across the domain.I want to redirect all of these to the URLs without the
.php
extension.I'm trying to use the Retour plugin to help me do this, but I've also tried modifying this config.
I just get "File not found." Help!
This is very helpful, otherwise!