WordPress IIS Multi Site Kurulumu 404 – File or directory not found hatası

Soru

Merhaba WordPresste multi site kurdum ikinci siteye geçiş yapmaya çalışınca 404 – File or directory not found hatası  alıyorum. Ağ ayarlarını yaptım web.config ve wp-config.php dosyalarını düzenledim fakat halen bir sonuca varamadım. Windows host kullanıyorum linuxta bir sorun yaşamıyorum windows için bir çözüm var mı?

Çözüldü 0
ates 2 sene 1 Cevap 505 gösterim 0

Cevap ( 1 )

  1. Bu cevap düzenlendi.

    Merhaba web.config dosyasına aşağıdaki kodu yapıştırın kaydedin sorununuz düzelecektir.

     

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>

            <clear />
            <!--
                    <rule name="Redirect to https" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                        </conditions>
                        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
                    </rule>
    -->
            
                     <rule name="WordPress Rule 1" stopProcessing="true">
                        <match url="^index.php$" ignoreCase="false" />
                        <action type="None" />
                    </rule>
                    <rule name="WordPress Rule 2" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
                        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
                    </rule>
                    <rule name="WordPress Rule 3" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
                        <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
                    </rule>
                    <rule name="WordPress Rule 4" stopProcessing="true">
                        <match url="^" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAny">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                        </conditions>
                        <action type="None" />
                    </rule>
                    <rule name="WordPress Rule 5" stopProcessing="true">
                        <match url="(^[_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    </rule>
                    <rule name="WordPress Rule 6" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(.*.php)$" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    </rule>
                    <rule name="WordPress Rule 7" stopProcessing="true">
                        <match url="." ignoreCase="false" />
                        <action type="Rewrite" url="index.php" />
                    </rule>

                </rules>
            </rewrite>
            <defaultDocument>
                <files>
                    <clear />
                    <add value="index.php" />
                    <add value="Default.htm" />
                    <add value="Default.asp" />
                    <add value="index.htm" />
                    <add value="index.html" />
                    <add value="iisstart.htm" />
                    <add value="default.aspx" />
                </files>         
            </defaultDocument>
            
        </system.webServer>
    </configuration>

    En iyi cevap

Cevap bırak