2013-06-20 107 views
0

我上傳我的網站到一臺服務器,使用Windows Server 2008 R2和我得到一個問題(我認爲它是由於.htaccess文件引起的)我得到內部500錯誤信息,即時使用xampplaravel內部500錯誤

我的網站不是直接在htdocs文件夾上,它的htdocs/server /也許可以是一個問題?

而且我的繼承人.htaccess文件

<IfModule mod_rewrite.c> 
Options -MultiViews 
RewriteEngine On 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule^index.php [L] 
</IfModule> 

感謝

+0

有創建httpd.conf文件虛擬主機 –

回答

1

我不認爲在Windows Server將服從你的的.htaccess。 嘗試在您的webconfig文件中定義相同的邏輯。 首先,你需要引導它作爲你的網站的根,公用文件夾。 然後裏面這個文件夾,試試這個的web.config

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
    <defaultDocument> 
     <files> 
      <clear /> 
      <add value="index.php" /> 
      <add value="default.aspx" /> 
      <add value="Default.htm" /> 
      <add value="Default.asp" /> 
      <add value="index.htm" /> 
      <add value="index.html" /> 
     </files> 
    </defaultDocument> 
    <handlers accessPolicy="Read, Execute, Script" /> 
    <rewrite> 
     <rules> 
      <rule name="Imported Rule 2" stopProcessing="true"> 
       <match url="^(.*)$" ignoreCase="false" /> 
       <conditions logicalGrouping="MatchAll"> 
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> 
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> 
       </conditions> 
       <action type="Rewrite" url="index.php/{R:1}" /> 
      </rule> 
     </rules> 
    </rewrite> 
</system.webServer> 
</configuration> 

最良好的祝願