Title: web.config redirect problem
Last modified: August 20, 2016

---

# web.config redirect problem

 *  [ProCessor](https://wordpress.org/support/users/processor/)
 * (@processor)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/webconfig-redirect-problem/)
 * Hi there,
 * I am having trouble configuring the web.config file (host uses windows IIS servers).
   
   With permalink setting to /%postname%/ a 404 error occured (when visiting homepage),
   the rest of the pages worked perfectly (with …/slugname).
 * In order to fix the issue with the homepage, the host had configured this web.
   config file:
 *     ```
       <?xml version="1.0" encoding="UTF-8"?>
       <configuration>
           <system.webServer>
             <rewrite>
               <rules>
                 <rule name="Main Rule" stopProcessing="true">
                   <match url=".*" />
                   <conditions logicalGrouping="MatchAll">
                     <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                     <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                   </conditions>
                   <action type="Rewrite" url="index.php/{R:0}" />
                 </rule>
               </rules>
             </rewrite>
              <httpRedirect enabled="true" destination="/home" childOnly="true" />
             </system.webServer>
       </configuration>
       ```
   
 * Now it works, but yet another problem occurs.
    The WordPress Dashboard isn’t 
   reachable anymore by /wp-admin or /wp-login.php
 * Both are changed to /home/wp-admin or /home/wp-login.
 * Any idea on how to fix this?
    Is there an option to exclude *.php files or something
   from redirecting?
 * Hope you can help out!

The topic ‘web.config redirect problem’ is closed to new replies.

## Tags

 * [config](https://wordpress.org/support/topic-tag/config/)
 * [dashboard](https://wordpress.org/support/topic-tag/dashboard/)
 * [home](https://wordpress.org/support/topic-tag/home/)
 * [iis](https://wordpress.org/support/topic-tag/iis/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [web](https://wordpress.org/support/topic-tag/web/)
 * [web.config](https://wordpress.org/support/topic-tag/web-config/)
 * [windows](https://wordpress.org/support/topic-tag/windows/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [ProCessor](https://wordpress.org/support/users/processor/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/webconfig-redirect-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
