简体   繁体   中英

Web.config images not showing

My web.config looks like the below:

<?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>
    <httpErrors errorMode="Detailed" />

When I try to request an image in a sub-folder I'm getting a error:

HTTP Error 500.50 - URL Rewrite Module Error.

If I change the line:

<match url="*" />

to

<match url=".*" />

Then the image displays, but the rewrite for my laravel app in the root directory doesn't work and gives a 404 error.

I need to change the web.config so that both the laravel app and the images work.

你应该试试:

<match url="^" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM