Hi community!
First of all I have to praise Easy Engine - saves me heaps of time every day! I’ve seen this thread which is kind of what I’m looking for but more universal.
I have my own server where I host a few websites. It’s quite common for old websites to execute directly .php files. I’m happy to handle it from WP but this part of nginx prevents it:
location ~ \.php$ {
try_files $uri =404;
(...)
I’ve been trying a few options securely but no luck so far.
What I’d be keen to have is a rewrite rule that if anyone enters somelink.com/about-us.php it would first try to see if there’s PHP file matching this URL and if not then redirect to somelink.com/about-us
Now that comes with risk of accessing directing plugin or WP files thus my question. Anyone had experience like that before?
hint if you need to solve it quickly currently I just create simple php file in WP main directory matching the file name with redirect in it for those pages - good workaround