Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIS web.config Error 404 #247

Open
aliciacbu opened this issue Aug 22, 2018 · 0 comments
Open

IIS web.config Error 404 #247

aliciacbu opened this issue Aug 22, 2018 · 0 comments

Comments

@aliciacbu
Copy link

Hi everybody!

My web server is IIS 7.5 and I'm trying to convert .htaccess files to web.config but I have a problem with the second web.config (in /public). The links in the menu get an Error 404.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
       <rewrite>
          <rules>
             <rule name="Main Rule" stopProcessing="true">
                 <match url="^(.+)$" ignoreCase="false" />
                  <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    </conditions>
                  <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

The web.config file in / works well:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
       <rewrite>
		  <rules>
		     <rule name="public" stopProcessing="true">
                            <match url="^(.*)" ignoreCase="false" />
                             <action type="Rewrite" url="public/{R:1}" />
                      </rule>
		  </rules>
         </rewrite>
    </system.webServer>
</configuration>

Can someone help me with this or with the configuration for URL in config.php?

Error details:

IIS Web Core
MapRequestHandler
StaticFile
0x80070002

URL request: http://localhost:81/site/public/page1
Path: C:\inetpub\wwwroot\site\public\page1

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant