目前我在简单的linux托管上运行网站,但我购买了Windows VPS,我安装了2008服务器+ plesk,我试图在新的VPS上移动网站。 我遇到了一个问题 - 第一个index.php页面看起来不错,但它只是LOG-IN页面所以我必须输入登录/密码凭据,成功登录后我应该在管理员面板中但是有一个错误:
"500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
"
我认为我必须将我的.httaccess文件转换为web.config,但我仍然收到了该错误。我不知道我做错了还是我还要做别的事。
这是.httaccess
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{REQUEST_FILENAME} !-f
#module@account
RewriteRule ^login.html$ /index.php?m=login [L]
RewriteRule ^wyloguj.html$ /index.php?m=login&a=wyloguj [L]
#RewriteRule ^nowehaslo,(.*).html$ /index.php?m=login&a=nowehaslo&token=$1 [L]
#module@panel,ajax
RewriteRule ^panel.html$ /index.php?m=panel [L]
RewriteRule ^panel,ajax.html$ /index.php?m=panel&a=ajax [L]
RewriteRule ^produkt/([0-9]*)/(.*)$ /index.php?m=panel&a=produktplik&user=$1&file=$2 [L]
RewriteRule ^faktura/(.*).pdf$ /index.php?m=panel&a=faktura&crypt=$1 [L]
RewriteRule ^productcount,([a-z]*),([0-9]*),([0-9]*).(.*)$ /index.php?m=panel&a=productcount&type=$1&user=$2&product=$3 [L]
RewriteRule ^sprawdz.html$ /index.php?m=panel&a=sprawdz [L]
#module@claim
RewriteRule ^reklamacja,(.*).html$ /index.php?m=claim&ident=$1 [L]
#module@cron
RewriteRule ^cron,([a-zA-Z0-9_]*).html$ /index.php?m=cron&f=$1 [L]
RewriteRule ^userCron,(.*),(.*).html$ /index.php?m=cron&a=userCron&f=$1&user=$2 [L]
这里是web.config
<?xmlversion="1.0"encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rulename="rule1e"stopProcessing="true">
<matchurl="^login.html$"/>
<actiontype="Rewrite"url="//index.php?m=login"/>
</rule>
<rulename="rule2e"stopProcessing="true">
<matchurl="^wyloguj.html$"/>
<actiontype="Rewrite"url="//index.php?m=login&a=wyloguj"/>
</rule>
<rulename="rule3e"stopProcessing="true">
<matchurl="^panel.html$"/>
<actiontype="Rewrite"url="//index.php?m=panel"/>
</rule>
<rulename="rule4e"stopProcessing="true">
<matchurl="^panel,ajax.html$"/>
<actiontype="Rewrite"url="//index.php?m=panel&a=ajax"/>
</rule>
<rulename="rule5e"stopProcessing="true">
<matchurl="^produkt/([0-9]*)/(.*)$"/>
<actiontype="Rewrite"url="//index.php?m=panel&a=produktplik&user={R:1}&file={R:2}"/>
</rule>
<rulename="rule6e"stopProcessing="true">
<matchurl="^faktura/(.*).pdf$"/>
<actiontype="Rewrite"url="//index.php?m=panel&a=faktura&crypt={R:1}"/>
</rule>
<rulename="rule7e"stopProcessing="true">
<matchurl="^productcount,([a-z]*),([0-9]*),([0-9]*).(.*)$"/>
<actiontype="Rewrite"url="//index.php?m=panel&a=productcount&type={R:1}&user={R:2}&product={R:3}"/>
</rule>
<rulename="rule8e"stopProcessing="true">
<matchurl="^sprawdz.html$"/>
<actiontype="Rewrite"url="//index.php?m=panel&a=sprawdz"/>
</rule>
<rulename="rule9e"stopProcessing="true">
<matchurl="^reklamacja,(.*).html$"/>
<actiontype="Rewrite"url="//index.php?m=claim&ident={R:1}"/>
</rule>
<rulename="rule10e"stopProcessing="true">
<matchurl="^cron,([a-zA-Z0-9_]*).html$"/>
<actiontype="Rewrite"url="//index.php?m=cron&f={R:1}"/>
</rule>
<rulename="rule11e"stopProcessing="true">
<matchurl="^userCron,(.*),(.*).html$"/>
<actiontype="Rewrite"url="//index.php?m=cron&a=userCron&f={R:1}&user={R:2}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
&#13;
有人可以帮我吗?
干杯
答案 0 :(得分:0)
RewriteRule极不可能导致500错误。所以,首先,我建议您尝试直接尝试请求目的地,绕过规则以查看它是否以这种方式工作。 您还可以在ISAPI_Rewrite中启用日志记录,以查看是否由于重写而发生问题。 最后,您可以使用IIS中的失败请求跟踪工具查看请求发生的所有事情,查看失败的阶段以及“谁”负责此阶段。