Permalink in WPMU appears to not work

Hi, I don't know what I did to something that was working.

WPMU permalink set to the default work BUT if I put them in the "Post Name" mode they fail with a 404 message. "Not Found

The requested URL /what-is-timeshare-software/ was not found on this server."

The menu items change but do not work, even when I go to a post and click the preview button.

WP 4.3.1 (just updated)

  • Adam Czajczyk

    Hello @Jpforte,

    I hope you're well today and thank you for your question!

    I assume that this was working all right prior to WordPress update, am I correct? Also, have you checked if all the sub-sites (at least front pages of them) are loading fine?

    I think you may also try following simple steps:

    1) disable all caching and security plugins if there are any (e.g. W3 Total Cache, Wordfence etc)
    2) re-set and re-save permalinks
    3) clear browser's cache and give it another try.

    If it doesn't help, could you please
    - let me know if you're using sub-domain or sub-directory type Multisite install
    - paste the content of your .htaccess file here

    Looking forward for your answer!

    Best regards,
    Adam

  • Jpforte

    HI,

    I tried all that and no joy.
    SubDomain, actually completely different, "Sites"

    Turned off Cloudflare features to make sure
    ======================= Clip =========================
    # BEGIN All In One WP Security
    #AIOWPS_BASIC_HTACCESS_RULES_START
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    ServerSignature Off
    LimitRequestBody 10240000
    <Files wp-config.php>
    order allow,deny
    deny from all
    </Files>
    #AIOWPS_BASIC_HTACCESS_RULES_END
    #AIOWPS_PINGBACK_HTACCESS_RULES_START
    <Files xmlrpc.php>
    order deny,allow
    deny from all
    </Files>
    #AIOWPS_PINGBACK_HTACCESS_RULES_END
    #AIOWPS_DISABLE_INDEX_VIEWS_START
    Options -Indexes
    #AIOWPS_DISABLE_INDEX_VIEWS_END
    #AIOWPS_IP_BLACKLIST_START
    Order allow,deny
    Allow from all
    Deny from 198.204.243.115
    #AIOWPS_IP_BLACKLIST_END
    #AIOWPS_DISABLE_TRACE_TRACK_START
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    #AIOWPS_DISABLE_TRACE_TRACK_END
    #AIOWPS_FORBID_PROXY_COMMENTS_START

  • Adam Czajczyk

    Hello Jpforte!

    Assuming that you didn't cut it off by mistake while pasting here, it seems that there's significant lack of important rules in your .htaccess file. Aren't there any rules like those below?

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    This is the default WP Multisite .htaccess content that makes it possible to work. I think that if there's no such rules in your .htaccess (except "RewriteEngine On" which I can see there), you may want to try to add them (anywhere below "RewriteEngine On").

    Let me know if it helped,please!

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Jim!

    Thanks for this additional info.

    I've reviewed your .htaccess file and took a look at both printouts. I've also checked domains enlisted (sites) and I admit I'm starting to get quite confused.

    I can see that there's a redirect on your main domain but subdomains seem to be loading fine. However: 1) none of the subdomains seem to replay to ping 2) it looks like at least two domains should be mapped to sub-sites but I can't see any domain mapping plugin/tool there.

    That said, I don't think I could go further with this investigation at the moment so would you be able to let me access your setup directly? In order to do this, please send in:

    Subject: "Attn: Adam Czajczyk"

    - your site's WordPress admin login URL
    - admin login and password (may be a temporary account)
    - FTP credentials (hostname, username, password, port number if needed)
    - phpMyAdmn login url (or cPanel access credentials)
    - any other relevant URLs and information
    - link back to this thread

    Please use our contact form here https://premium.wpmudev.org/contact/.
    Select "I have a different question" from the drop-down list.

    Please be sure to make a full backup of your entire site first!

    Let me know here after sending a message, please.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Jim,

    Thank you for your message and I'm sorry for the delay on my side.

    I took a look at your site and also accessed your server directly. At this moment I'm still sticking to the thought that the main culprit here is .htaccess. I reviewed all existing .htaccess files for your site (the currently "active" one and those backuped) and so far the .htaccess.bak file looks closest to the proper one.

    I realize that those other files include some security rules but I think it would be worth working with default one and once the site is up and running - getting back to security rules.

    That said, I tried to replace the .htaccess but it seems that my access is limited as I wasn't granted permission to rename files (or change file permissions). Would you then please replace your current .htaccess with .htaccess.bak and let me know?

    If this doesn't help "out of the box", please don't replace it back and I'll further investigate the issue having this "default" .htaccess active.

    Best regards,
    Adam

  • Rupok

    Hi Jpforte

    I hope you had a wonderful day.

    It seems like you need to change "AllowOverride None" to "AllowOverride All" in the apache settings of your server.

    In case you are on ubuntu, edit the file /etc/apache2/apache2.conf
    From:

    <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
    </Directory>

    To:

    <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
    </Directory>

    Then restart apache service with the following command:
    sudo service apache2 restart

    If you don't have access to the configuration of your server, please ask your server provider to do it for you. It should solve the problem.

    Have a nice day. Cheers!
    Rupok

    AllowOverride None

  • Rupok

    Hi Jpforte

    This seems to be weird. Can you please replace all other existing .htaccess rules with the following and check if this solves your issue? Don't forget to take a backup of your current .htaccess file.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    In network setup option from WordPress, they say:

    Add the following to your .htaccess file in root web directory, replacing other WordPress rules.

    As they enforce replacing, can you please try replacing? And please make sure your CDN is disable while checking and let us know the result. I'm looking forward to know your result and solving the problem asap.

    Have a nice day. Cheers!
    Rupok

  • Rupok

    Hi Jpforte

    I do apologize if I could not make you understand. From the replies above, I can see that @Adam Czajczyk was checking if the default rules were still there or not but I suggested you to have *only* the default rules inside your .htaccess file and check if the problem is still there.

    However, as you suggested, I'm tagging @Adam Czajczyk here and I believe he will be able to give his valuable opinion on this.

    Have a nice day. Cheers!
    Rupok

  • Jpforte

    I am back on this issue again! I took this site off of the multisite and put it on its own independent site. I exported the site, into the xml file, then loaded it into a blank freshly loaded (latest.zip) file, new database setup.

    I then imported the blogs and OMG the permalink did not work. Yikes. the .htaccess files is the default.
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  • Adam Czajczyk

    Hey Jpforte,

    I hope you're well today and thank you for getting back to us!

    I'm sorry I didn't responded to you previously after my colleague @Rupok has posted here. Since he posted and you didn't reply the thread go pushed out of my response queue automatically so I didn't notice his replay. Once again, I apologize!

    As for the issue itself. Just to make sure: do I understand correctly that managed to make it work after all so the issue could be considered resolved? Or do you still need assistance?

    Let me know please!

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.