תסמינים
-
דפי אתר המבוססים על וורדפרס מציגים את השגיאה למטה בכל הדפים מלבד הראשי:
404 Not Found
מתי:-
אפליקציית FPM המוגשת על ידי nginx מוגדרת בדומיינים > example.com > הגדרות PHP
- מצב פרוקסי מופעל ב- Domains > example.com > הגדרות Apache ו-nginx .
-
אפליקציית FPM המוגשת על ידי nginx מוגדרת בדומיינים > example.com > הגדרות PHP
נקודת WordPress REST API (wp-api) מציגה שגיאה 404. ניתן לבדוק זאת על ידי גישה
http://example.com/wp-json/wp/v2/posts
פתרון הבעיה
היכנס ל- Plesk
עבור אל Domains > example.com > מנהל הקבצים > httpdocs
-
צור קובץ
.htaccess
הדבק את תוכן הבא:# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress