Problem Description
When visiting pages of your website that are not the homepage, clicking on any given link redirects you back to the homepage and no sub-pages will load.
This occurs when your advanced web server configuration is configured to handle all PHP requests directly with nginx (rather than passing them through to apache) yet your PHP handler is configured to use apache. We likely enabled nginx direct processing in order to better optimize either your website specifically or the entire server it is hosted upon. The PHP handler setting may have more recently been reset to use apache if you have changed your PHP version number. Since our advanced configuration is still in place, it causes a conflict, resulting in the redirects to your homepage.
This occurs when your advanced web server configuration is configured to handle all PHP requests directly with nginx (rather than passing them through to apache) yet your PHP handler is configured to use apache. We likely enabled nginx direct processing in order to better optimize either your website specifically or the entire server it is hosted upon. The PHP handler setting may have more recently been reset to use apache if you have changed your PHP version number. Since our advanced configuration is still in place, it causes a conflict, resulting in the redirects to your homepage.
Problem Resolution
To resolve this issue simply follow these steps:
- Log in to Plesk
- Click on "PHP settings" for the domain you're having trouble with
- Change the PHP handler ("run PHP as") to "FPM application served by nginx".
- Click OK or Apply
Your site should now operate properly. If you're still having issues, open a ticket and we'll be happy to help you out!
Note: if you have admin access to Plesk (your own VPS) an alternative solution is to set the PHP Handler to Apache (with either fastcgi or fpm) and under Apache and nginx settings, within the advanced nginx config box, place a # at the start of the line that refers to nginx rewrites. This will ensure all rewriting is handled by Apache via .htaccess.