2010-12-09 32 views
10

Ich verwende WordPress auf Windows 7 IIS zu entwickeln. Ich lade Bilder in WordPress für einen Blogbeitrag hoch. Das Bild zeigt auf der Webseite gut, aber sobald ich ermögliche Permalinks die Bilder nicht mehr arbeiten und alle zukünftigen Bilder, die ich wieder einen Fehler hochgeladen erhalten:Wordpress Permalinks auf IIS?

HTTP Error 500.50 - URL Rewrite Module Error. 
The page cannot be displayed because an internal server error has occurred. 

Ich bin nicht sicher, warum dies hier geschieht würde, ist mein web.config:

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    <rewrite> 
     <rules> 
     <rule name="wordpress" patternSyntax="Wildcard"> 
      <match url="*" /> 
      <conditions> 
       <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
      </conditions> 
      <action type="Rewrite" url="index.php" /> 
     </rule> 
     </rules> 
    </rewrite> 
    </system.webServer> 
</configuration> 

Sobald ich meine Permalinks ausschalten und mit dem Standard es funktioniert, weiß jemand, warum dies sein könnte?

+0

Vielen Dank, das hat mir geholfen! suchte überall nach URL umschreiben Problem – SirG

Antwort

1

Es gibt eine etwas andere web.config unter Using Permalinks « WordPress Codex sowie andere Optionen für Permalinks ohne Mod Rewrite unter Windows.

+0

Hallo songdogtech, danke für den Link. Das waren die Dokumente, denen ich gefolgt bin, ich habe es versucht und immer noch kein Glück:/Hast du irgendwelche anderen Vorschläge? –

+0

Nevermind Ich reparierte es. Stellt sich heraus, IIS hatte keine Berechtigungen, ich folgte diesem: http://www.tech-problems.com/http-error-500-50-url-rewrit-module-error-wordpress-images/ und es hat gut funktioniert ! –

+0

Ich denke, dass der WordPress-Codex falsch ist. Die 'web.config', die @JeffTaggarty hat für mich funktioniert aber die WordPress funktioniert nicht. Es stimmt auch nicht mit der [IIS.net-Dokumentation] überein (http://www.iis.net/learn/extensions/url-rewrite-module/enabling-pretty-permalinks-in-wordpress) – icc97

13

The image issue was a permission issue, but simply setting it manually on the original image file or parent folder is inadequate. The behavior of WordPress is that it writes the original file using IUSR to a temporary system directory that is defined in the PHP.ini file. This temp folder does not have IIS_IUSRS permissions on it, so when windows moves this file from the temp folder to the application's upload folder, its final home, IIS_IUSRS only has read permissions, so the permissions are not inherited from the file's parent folder.

To fix this, there are two solutions.

  1. Change the permissions on the temp folder giving IIS_IUSRS write/modify.
  2. Change the path of the temp folder in the PHP.ini file to a folder that does have IIS_IUSRS write/modify permission.

Here is a good source detailing the problem: http://www.howyoudo.info/index.php/how-to-fix-windows-server-upload-file-inherit-permissions-error/

I chose to move the temp folder in my PHP.ini to C:\inetpub\temp\uploads and also give it permissions. After uploading an image in wp-admin, I was able to access the image (original, not resized) from a browser wihout the 500.50 error.

From source

+0

behebt keine bereits hochgeladenen Dateien, aber der C: \ inetpub \ temp \ uploads-Trick funktionierte großartig. Stellen Sie sicher, dass Sie die richtigen Berechtigungen für inetpub \ temp \ uploads festlegen. Alle neuen Medienbibliothek-Uploads erhalten die 500.50 nicht mehr, nachdem sie die php.ini geändert und den Webserver neu gestartet haben. – NeuroScr

0

Verwendung dieses unter Erwähnung Regeln in Ihrer web.config Datei ..

<rule name="Imported Rule 1" stopProcessing="true"> 
     <match url="^index\.php$" ignoreCase="false"/> 
     <action type="None"/> 
    </rule> 

    <rule name="Redirect Image to HTTP" stopProcessing="true"> 
     <match url=".*\.(gif|jpg|jpeg|png|css|js)$" ignoreCase="true"/> 
     <action type="Rewrite" url="{R:0}"/> 
    </rule> 

    <rule name="Imported Rule 2" stopProcessing="true"> 
     <match url="." ignoreCase="false"/> 
     <conditions> 
      <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"/> 
    </rule> 
Verwandte Themen