【发布时间】:2015-02-03 21:33:01
【问题描述】:
目前我在简单的 linux 主机上运行站点,但我购买了安装 2008 server + plesk 的 windows VPS,我正试图将站点移到新的 VPS 上。 我遇到了一个问题 - 第一个 index.php 页面看起来不错,但它只是登录页面,所以我必须输入登录/密码凭据,成功登录后我应该在管理员面板中,但出现错误:
"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>
有人可以帮我吗?
干杯
【问题讨论】:
标签: web-config url-rewrite-module isapi-rewrite