Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author somewebmedia

    (@somewebmedia)

    Window servers uses different way for URL rewriting. But as I do not have the possibility to install Windows server, I don’t have any way of testing it.

    Thread Starter claudchan

    (@claudchan)

    Thanks, but could anyone can guide me on this please?
    Anyone?

    Plugin Author somewebmedia

    (@somewebmedia)

    There is a guide on WP codex, you can try it and let us know does the plugin work

    http://codex.wordpress.org/Installing_on_Microsoft_IIS#Step_5._Enable_clean_URLs_.28Pretty_Permalinks.29

    Thread Starter claudchan

    (@claudchan)

    Thanks but I already have that web.config code in. I am not a programmer and I need help on how to convert / to code that in web.config file.

    By default generated code:

    # BEGIN WPAdminURL
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^secret-login/?$ /wp-login.php [QSA,L]
    </IfModule>
    # END WPAdminURL

    But how to convert that in Web.config file?

    Plugin Author somewebmedia

    (@somewebmedia)

    They stated that the WP should automatically generate proper code as you can see here: http://codex.wordpress.org/images/8/82/Web.config_file_contents.png

    But here is an online .htaccess to web.config converter you could try http://cbsa.com.br/tools/online-convert-htaccess-to-web-config.aspx

    Thread Starter claudchan

    (@claudchan)

    Doesn’t work.

    Here is the converted code:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    	<system.webServer>
    		<rewrite>
    			<rules>
    				<rule name="WordPress Rule" stopProcessing="true">
    					<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?page_id={R:0}" />
    				</rule>
    				<rule name="rule 1E" stopProcessing="true">
    					<match url="^overseer/?$"  />
    					<action type="Rewrite" url="//wp-login.php" appendQueryString="true" />
    				</rule>
    			</rules>
    		</rewrite>
    	</system.webServer>
    </configuration>
    Plugin Author somewebmedia

    (@somewebmedia)

    Maybe to try like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    	<system.webServer>
    		<rewrite>
    			<rules>
                                    <rule name="rule 1E" stopProcessing="true">
    					<match url="^overseer/?$"  />
    					<action type="Rewrite" url="//wp-login.php" appendQueryString="true" />
    				</rule>
    				<rule name="WordPress Rule" stopProcessing="true">
    					<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?page_id={R:0}" />
    				</rule>
    			</rules>
    		</rewrite>
    	</system.webServer>
    </configuration>
    Thread Starter claudchan

    (@claudchan)

    This is great!
    Thank you. It is working now.
    But can explain why the code positioning just to move on top and it work, how come?

    Plugin Author somewebmedia

    (@somewebmedia)

    As you can see, you have 2 rules in that code. <rule…></rule>
    The thing is that the server checks one rule at a time. So if the rule is met, it is executed without checking the next rule. So by placing our rule on the top, we are assuring it is checked first.

    Glad I could help. 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to Install on Windows server (IIS) – Setting Web.config’ is closed to new replies.