[resolved] User registration activation link 404 (11 posts)

  1. hpm4
    Posted 4 years ago #

    I manually register users from the dashboard, they receive the verification email with the link "siteurl/networksitename/wp-activate.php?key=###"

    They click the link, however receive a 404 error while receiving their username and password in their email inbox.

    My production and development servers are more or less the same, my development server works, however the production machine produces the 404.

    Can anyone help, why am I receiving the 404 error?

    OS: MS Server 2008
    WP version: 3.3.1

    I believe my config file may be at fault, however not 100% sure.


    <?xml version="1.0" encoding="UTF-8"?>
                    <rule name="WordPress Rule 1" stopProcessing="true">
                        <match url="^index\.php$" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="None" />
                    <rule name="WordPress Rule 2" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
                    <rule name="WordPress Rule 3" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
                    <rule name="WordPress Rule 4" stopProcessing="true">
                        <match url="^" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAny" trackAllCaptures="false">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                        <action type="None" />
                    <rule name="WordPress Rule 5" stopProcessing="true">
                        <match url="^[_0-9a-zA-Z-]+/(wp-*.*)" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="{R:1}" />
                    <rule name="WordPress Rule 6" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="{R:1}" />
                    <rule name="WordPress Rule 7" stopProcessing="true">
                        <match url="." ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Rewrite" url="index.php" />
                    <clear />
                    <add value="index.php" />
                    <add value="home.php" />
                    <add value="default.php" />
                    <add value="index.htm" />
                    <add value="index.html" />
                <remove statusCode="404" subStatusCode="-1" />
                <error statusCode="404" prefixLanguageFilePath="" path="/index.php?error=404" responseMode="ExecuteURL" />
  2. What version of IIS are you on?

  3. hpm4
    Posted 4 years ago #

    Running IIS 7
    plus I have installed the URL Rewrite module.

  4. I've appealed to the IIS folks, as it's a little out of my range :/

    You could try upgrading to 3.4.1 since I know there was some fixes made in regards to IIS redirects there in.

  5. hpm4
    Posted 4 years ago #


    I am losing hair over this, as it works ok in development, but not in production.

    I have mirror the site and I still cannot figure out what is happening.

    Come on, someone out there may know whats happening or has experienced a similar issue.

  6. Whats the difference between your dev and prod setups?

  7. hpm4
    Posted 4 years ago #

    Server 2008
    WordPress deployed using the hosting company one click install feature.
    IIS URL Rewrite module (not sure which version was installed)

    Windows 7
    Installed all components manually (PHP, MySQL)
    IIS URL Rewrite module 2

    Operating system shouldn't be a problem as both run the same version of IIS, that is important.

    Plugins are more or less the same, I have even gone as far as disabling all plugins (my clients weren't too happy about that.)

  8. Sadly, it's got to be a server thing then :/ Either an add-on or a tool configuration isn't right.

  9. hpm4
    Posted 4 years ago #

    Need a bit of help.

    If I copy the activation and change it from siteurl/networksitename/wp-activate.php?key=### to siteurl/wp-activate.php?key=###, it works.
    Essentially removing the network site name and pointing to the default site.

    I haven't worked much with IIS URL rewrite module, therefore I would be greatful for a bit of help with the following.

  10. hpm4
    Posted 4 years ago #

    <rule name="Redirect:Activation" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
                        <match url="^(([_0-9a-zA-Z-]+/)(wp-*.*)" />
                        <action type="Redirect" url="{R:1}{R:3}" appendQueryString="false" />

    Wrote my redirect rule, it works on development but not on production site.
    Need to take a break and think about what is happening.

  11. hpm4
    Posted 4 years ago #

    Created a redirect using IIS URL rewrite module and moved it to the the top of the URL rewrite list.

    <rule name="Redirect: Activation link" enabled="true" stopProcessing="true">
                        <match url="^[_0-9a-zA-Z-]+/(wp-activate.*)" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                        <action type="Redirect" url="{R:1}" appendQueryString="true" />


Topic Closed

This topic has been closed to new replies.

About this Topic