• I’m trying to change the permalinks to the postname, but when I try to update it says I need to update web.config. All the links on my site are broken. Can someone please tell me what I need to write in the web.config file? (I don’t have access to the .htacess file.)

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thanks for your quick response – I set my permalinks back to the default for now (so at least I can update my pages) and I’ll have godaddy send me over to a linux server.

    Thanks again!

    Awesome. Ya Linux will solve your issues. Good luck and let me know if you have any other issues

    I appreciate your offer – thanks!

    No problem at all

    Hi, I am having a similar issue. I, too, am on a Windows server because the primary domain on our deluxe hosting account was once aspx. That primary domain is now a wordpress site.

    I am trying to use pretty permalinks on a domain that is rooted in a subfolder of the primary hosting domain. In other words:

    PrimaryDomainRoot <–first wordpress install is here
    >..
    >SecondaryDomainRoot <–second wordpress install is here
    >OtherFolders

    The dilemma appears to be that there is a web.config file in the PrimaryDomainRoot folder… and using pretty permalinks in the secondary domain/wordpress installation adds a second web.config file to the SecondaryDomainRoot folder.

    Is there a known way to get around this? Would moving to Linux fix this particular problem? I’m not opposed to doing that, but a third party developed our first wordpress site and it involves a) an older version of wp, b) a custom theme developed by said third party and c) several plugins/widgets. I’m very nervous about moving all of that to a new server.

    Thanks for any light you might shed on the subject!

    kylepollock

    (@kylepollock)

    I am having this same problem as well. I am on a Windows server, which my employer uses (a university). I’m creating a wordpress site and can’t seem to get rid of the /index.php/ before each /sample-post/.

    I cannot find the web.config file, but since wp-config.php @jclark32 said they’re not the same, I tried creating the web.config file.

    When I did I got this message when trying to click on any link.

    Server Error
    500 – Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed.

    I’d appreciate any help as well.

    Use this code in web.config, it fixed my issue which was same.

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="WordPress Rule 1" stopProcessing="true">
                        <match url="^index\.php$" ignoreCase="false" />
                        <action type="None" />
                    </rule>
                    <rule name="WordPress Rule 2" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
                        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
                    </rule>
                    <rule name="WordPress Rule 3" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
                        <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
                    </rule>
                    <rule name="WordPress Rule 4" stopProcessing="true">
                        <match url="^" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAny">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                        </conditions>
                        <action type="None" />
                    </rule>
                    <rule name="WordPress Rule 5" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    </rule>
                    <rule name="WordPress Rule 6" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    </rule>
                    <rule name="WordPress Rule 7" stopProcessing="true">
                        <match url="." ignoreCase="false" />
                        <action type="Rewrite" url="index.php" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use a pastebin. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Permalinks – "You should update your web.config now"’ is closed to new replies.