移动后网站内部错误为500



我们已将我们的网站移至新的托管服务提供商,并创建了一个新数据库并在此数据库中导入了旧数据库。当我们访问该网站时,我们得到由.htacces引起的500内部错误,但不知道为什么它在新服务器上不起作用,而在旧服务器上不起作用。

您可以在以下位置找到该网站: http://deteakspecialist.nl.webhosting72.transurl.nl/

.htacces 看起来像:

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName deteakspecialist.nl
RewriteEngine on
RewriteRule ^callme$ index.php?p=callme [L]
RewriteRule ^callmeok$ index.php?p=callmeok [L]
RewriteRule ^cart$ index.php?p=cart [L]
RewriteRule ^contact$ index.php?p=contact [L]
RewriteRule ^links$ index.php?p=links [L]
RewriteRule ^newsletter$ index.php?p=newsletter [L]
RewriteRule ^newsletterok$ index.php?p=newsletterok [L]
RewriteRule ^order$ index.php?p=order [L]
RewriteRule ^orderok$ index.php?p=orderok [L]
RewriteRule ^payment$ index.php?p=payment [L]
RewriteRule ^product/(.*?)/.*?$ index.php?p=product&i=$1 [L]
RewriteRule ^productgroup/(.*?)/.*?$ index.php?p=productgroup&i=$1 [L]
RewriteRule ^productgroups/(.*?)/.*?$ index.php?p=productgroups&i=$1 [L]
RewriteRule ^productimage/(.*?)/.*?$ /media/product/$1.jpg [L]
RewriteRule ^productimagethumb/(.*?)/.*?$ /media/product/thumb/$1.jpg [L]
RewriteRule ^productinfo/(.*?)/.*?$ index.php?p=productinfo&i=$1 [L]
RewriteRule ^productinfook/(.*?)/.*?$ index.php?p=productinfook&i=$1 [L]
RewriteRule ^project$ index.php?p=project [L]
RewriteRule ^search$ index.php?p=search&%{QUERY_STRING} [L]
RewriteRule ^service$ index.php?p=service [L]
RewriteRule ^sitemap$ index.php?p=sitemap [L]
RewriteRule ^Teak-tuinmeubelen$ index.php [L,NC]
RewriteRule ^terms$ index.php?p=terms [L]
ErrorDocument 404 /index.php?p=404
RewriteCond %{HTTP_HOST} ^deteakspecialist.nl$ [OR]
RewriteCond %{HTTP_HOST} ^www.deteakspecialist.nl$
RewriteRule ^teakhouten-tuinmeubelen.php$       "http://www.teaktuinmeubelen.nl/teakhouten-tuinmeubelen" [R=301,L]

我们在错误日志中看到的错误如下所示:

[Wed Mar 11 10:52:23.874485 2015] [core:alert] [pid 79734] [client 92.70.27.237:50770] /sites/deteakspecialist.nl/www/.htaccess: Invalid command 'order', perhaps misspelled or defined by a module not included in the server configuration

有人知道如何解决这个问题吗?

[2015 年 3 月 11 日星期三 10:52:23.874485] [核心:警报] [PID 79734] [客户端 92.70.27.237:50770]/sites/deteakspecialist.nl/www/.htaccess:无效的命令"order",可能拼写错误或由模块定义 不是 包含在服务器配置中

这很可能是因为您可能正在使用Apache 2.2并且您的新主机可能正在使用Apache 2.4这会产生很大的不同。情况发生了变化,您需要在迁移之前检查这些内容。

order deny,allow
deny from all
allow from all

这些行不再用于Apache 2.4。因此,您需要转换设置以使用新Require all granted。旁注,无论如何,您的规则似乎都是冲突的。

主机很可能未启用mod_access_compat。所以它只会抛出一个错误。只需浏览并更新您的配置即可。

在移动站点之前,应始终检查主机上正在使用的软件版本。从PHP版本,Web服务器,数据库等所有内容。因为错误的版本可能会破坏您的代码,您必须更正代码才能使其与该版本一起使用。

http://httpd.apache.org/docs/2.4/upgrading.html#run-time

相关内容

最新更新