WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks - "You should update your web.config now" (23 posts)

  1. reneekatz
    Member
    Posted 2 years ago #

    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.)

  2. reneekatz
    Member
    Posted 2 years ago #

    Anyone know what I can do to fix the links?

  3. Jeff Clark
    Member
    Posted 2 years ago #

    what is the link to your site? web.config will involve a windows server so you wont have a .htaccess file. What version of wordpress are you running?

  4. Jeff Clark
    Member
    Posted 2 years ago #

    You really should not be running WordPress on a windows server. You should move it to linux but try this in your web.config file. Your web.config file is not writable on your server so you must add this manually.

    <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>

  5. reneekatz
    Member
    Posted 2 years ago #

    I have 3.3.1 and the site is http://www.reneekatz.com/

    I should be on a Linux server, does it matter I use a Windows OS on my computer?

    When I wrote that code in, the site says: Parse error: syntax error, unexpected '<' in D:\Hosting\8782496\html\wp-config.php on line 85

  6. Jeff Clark
    Member
    Posted 2 years ago #

    wp-config and web.config are two different files.

    Copy and past the error you got when you tried to change the permalink structure and remove any of the code I told you to add to web.config

  7. reneekatz
    Member
    Posted 2 years ago #

    Okay it does say "web.config". This is what shows up at the top of the wordpress admin page when I try to save the new permalink settings: "You should update your web.config now"

    I think this web.config is a file I can't access because of GoDaddy permissions, because I can't see it...

  8. Jeff Clark
    Member
    Posted 2 years ago #

    Are you sure you are on a linux server? web.config is associated with a windows sever. Can you see it if you login to godaddy and use there ftp file manager?

  9. reneekatz
    Member
    Posted 2 years ago #

    No I am NOT on a linux server, I am on a Windows server. And no I can't see it on their FTP file manager either. Im completely lost now.

    This sucks cause I need to be able to change the permalinks as a very basic function of WordPress. :(

  10. Jeff Clark
    Member
    Posted 2 years ago #

    move to a linux server and all your problems will be resolved.

    Try creating a web.config file and add the code I gave you earlier and upload it to the server and see if that fixes it. Otherwise I would highly recommend switching to linux.

    I had a client recently that wanted to be on a windows server and I told them it was a bad idea. We launched and had plenty of issues so they had me move it to linux like I suggested and have not had an issue sense.

  11. reneekatz
    Member
    Posted 2 years ago #

    I have told GoDaddy to move me to a Linux server! Thanks for the replies, I didn't know this was free.

  12. Jeff Clark
    Member
    Posted 2 years ago #

    Yes you can move server with no cost with godaddy. Sorry I should have specified. How long did they say it would take? I think typically it can take a few days?

  13. reneekatz
    Member
    Posted 2 years ago #

    Yeah, 72 hours at the most.

  14. Jeff Clark
    Member
    Posted 2 years ago #

    Cool, If you need anymore help after it is moved I would be happy to help. Just post it her and I will get back to you, but you should be all set. If so please mark this thread as resolved.

    thanks and good luck.

  15. ljanuska
    Member
    Posted 2 years ago #

    Hey jclark32, I'm having the same issue and I am on a windows server as well. I will get godaddy to move it, but I need to update this now.

    I'm also running wordpress 3.3.1.

    Can you tell me what code to add in to which file? Thanks!

  16. Jeff Clark
    Member
    Posted 2 years ago #

    Try the code above. Add it to your web.config file. Is there anything in your web.config file right now

  17. ljanuska
    Member
    Posted 2 years ago #

    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!

  18. Jeff Clark
    Member
    Posted 2 years ago #

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

  19. ljanuska
    Member
    Posted 2 years ago #

    I appreciate your offer - thanks!

  20. Jeff Clark
    Member
    Posted 2 years ago #

    No problem at all

  21. owlsheadbiz
    Member
    Posted 1 year ago #

    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!

  22. kylepollock
    Member
    Posted 1 year ago #

    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.

  23. SupportiveHands
    Member
    Posted 1 year ago #

    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.]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags