500 内部服务器错误 - GoDaddy flesk 服务器
500 Internal Server Error - GoDaddy flesk server
我开发的 WordPress 网站运行良好。当我将它移动到 GoDaddy flesk server
并尝试 create/edit
WordPress post 或页面时 - 它给出以下错误:
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
我的 .htaccess 文件是:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.php [L]
</IfModule>
# END WordPress
和web.config
文件是:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
如有任何帮助,我们将不胜感激。
谢谢
删除“# END WordPress”前后的 extra/empty 换行符。它应该可以解决问题。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.php [L]
</IfModule>
# END WordPress
终于找到解决办法了。只是我在 web.config
文件中添加了 <httpErrors errorMode="Detailed" existingResponse="PassThrough"/>
作为:
Get detailed errors
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="PassThrough"/>
<rewrite>
<rules>
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="PassThrough"/>
</system.webServer>
</configuration>
它给出了以下致命错误;
Fatal error: Class ‘MPCETemplate’ not found in C:\XXX\XXX\XXX\XXX\wp-content\plugins\motopress-content-editor\includes\ce\Library.php on line 1989
解决方法: 实际上,问题出在PHP代码中。 Library.php
在 motopress-content-editor
插件中丢失。
刚刚我登录了 WordPress 管理面板并停用了这个 motopress-content-editor
插件。开始工作了。
我开发的 WordPress 网站运行良好。当我将它移动到 GoDaddy flesk server
并尝试 create/edit
WordPress post 或页面时 - 它给出以下错误:
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
我的 .htaccess 文件是:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.php [L]
</IfModule>
# END WordPress
和web.config
文件是:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
如有任何帮助,我们将不胜感激。 谢谢
删除“# END WordPress”前后的 extra/empty 换行符。它应该可以解决问题。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.php [L]
</IfModule>
# END WordPress
终于找到解决办法了。只是我在 web.config
文件中添加了 <httpErrors errorMode="Detailed" existingResponse="PassThrough"/>
作为:
Get detailed errors
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="PassThrough"/>
<rewrite>
<rules>
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="PassThrough"/>
</system.webServer>
</configuration>
它给出了以下致命错误;
Fatal error: Class ‘MPCETemplate’ not found in C:\XXX\XXX\XXX\XXX\wp-content\plugins\motopress-content-editor\includes\ce\Library.php on line 1989
解决方法: 实际上,问题出在PHP代码中。 Library.php
在 motopress-content-editor
插件中丢失。
刚刚我登录了 WordPress 管理面板并停用了这个 motopress-content-editor
插件。开始工作了。