Question

I uploaded my website to a server that is using windows server 2008 r2 and Im getting a problem ( I think its caused because of the .htaccess files ) I get internal 500 error message, im using xampp

My website its not directly on htdocs folder, its on htdocs/server/ maybe that can be an issue?

Also heres my .htaccess file

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On

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

Thanks

Was it helpful?

Solution

I don't think Windows Server will obey your .htaccess. Try define the same logic in your webconfig file. First of all, you need to direct it to have as your website root, the public folder. And then inside this folder, try this 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> 

Best wishes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top