• Hi All

    From reading google and WP there seems to many of you struggling with the same issue I had which was.

    I would upload an image via the media uploader but when I tried to view that image I would get a 500 Internal Server error!

    All the correct CHMOD permissions were set on my server (my own dedicated box running WinServer2008).

    So .. I decided to get to the root of the issue!

    I think I now have the answer …

    One of the things I do in all my blogs is use a custom permalink setting.

    /%category%/%postname%/

    So I created a clean install of WP and uploaded an image. Then I went to view the image in a separate window.

    This was fine.

    The moment I put the custom permalink setting on it fell over and gave me the 500 Internal Server error when trying to view the image.

    Took out the custom permalink setting and reveted to default and et Voila! The image was back again!

    So – clearly there is an issue with the Custom Permalink even using the basic twentyten theme. FYI I had no plugins installed on this clean install of WP 3.0.3 so it wasn’t a plugin issue.

    I use Web Platform Installer to install WP blogs and this currently uses 3.0.3

    If anyone can shed any more light onto why the permalink settings would be causing the issue and if there is a possible fix then I would love to hear from you.

    Regards

    RSB

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    Using-permalinks guide states that:

    For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post’s permalink structure such as /%year%/%postname%/ or even /posts/%postname%/. (Some people recommend /%post_id%/%postname%/ which works for performance reasons but others recommend against it because it is unfriendly to users in the many contexts in which users interact with URLs.) See Otto’s technical writeup on the topic as well as this wp-testers discussion.

    The reason the images don’t show is because the URL rewrite created by the permalink change makes the web server look for the images in a place that doesn’t exist.

    Try changing the rule in web.config to be –

    <rule name=”wordpress” patternSyntax=”Wildcard”>
    <match url=”wp-content/uploads/*” negate=”true” />
    <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>

    I’m not sure if anything needs to be negated but this works for uploads.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘500 Internal server error upon completing upload of media – SOLUTION’ is closed to new replies.