1

I am using the Thesis theme with my WordPress multisite installation. I also changed the permalink settings from the Super Admin settings to remove /blog/ from the path.

But now my menu links are broken. The permalink structure now is /%postname%/ and my pages have the links mydomain.com/about/, mydomain.com/contact/ etc.

When I try and navigate to these pages, it gives me a 404 error.

Can someone please help me out on how to resolve this issue?

Thanks.

Some additional info

I checked the error logs and don't understand why the following log statements show up when I try to access the pages (if this helps in resolving the issue)

[Thu Mar 10 12:29:18 2011] [error] [client xxx.xxx.71.55] File does not exist: /var/www/html/about, referer: http://mydomain.com/
[Thu Mar 10 12:32:44 2011] [error] [client xxx.xxx.71.55] File does not exist: /var/www/html/contact, referer: http://mydomain.com/

Shouldn't it be looking for the files in the wp-content/themes/thesis folder?

ADDITIONAL INFO

The content of the .htaccess is here (is the same as that in Network Settings)

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

Also, I am using the steps here for using Thesis with multisite installation

3
  • You should revise the title: WordPress didn't break your menu links, your configuration broke WordPress' rewrite engine. Mar 15, 2011 at 14:06
  • Where are the 404'ing links going to compared to where they should be going to? Mar 15, 2011 at 15:46
  • John, which part of the configuration broke the links? Mar 16, 2011 at 7:08

4 Answers 4

2

This seems like a broken .htaccess-file. I too have removed /blog/ as the permalink path, but it had/should have no major impact on the use of the site. The error-log is correct, as WordPress by default opens mydomain.com/about/, and then places the page-content in the style of the theme.

I would say there are two highly possible reasons:

  • .htaccess is broke, you could either error-check it yourself, or post the content here if you are unsure how it works.
  • The Thesis theme does something "unusual" to the default functionality of Wordpress (ie. forcing permalink structures, .htaccess configurations or alternate methods for content retrieval). You could check this by testing your site with the default (Twentyten) theme.

EDIT:

From the beginning of installing WPMS (WordPress Multisite), you are told to do three things:

  1. Create a blogs.dir in /wp-content/
  2. Paste some code in your wp-config.php
  3. Paste some code in your .htaccess

(all this code is seen at Network Admin -> Settings -> Network Setup). That covers the standard WPMU installation, but at least in my experience does not create a working domain-mapping. So in addition to the Vanilla WPMU-install, I followed Otto's tutorial on WPMS 3.0 Domain Mapping.

One of the important things in this tutorial, is the installation of two plugins: Domain-mapping and Sunrise. Both are actually remnants of WPMU (before Multisite was integrated into Wordpress), but are kept updated for the purposed of Domain-Mapping. I'm not actually sure whether Wordpress by default has a working system for domain-mapping integrated in 3.1, but I am still dependent upon those two plugins for using domains with my WPMS.

8
  • Added the contents of .htaccess file to the question. Thanks. Mar 15, 2011 at 8:02
  • I am using subfolder sites if that helps. Mar 15, 2011 at 8:04
  • @lostInTransit I am a little baffled by this, as your setup is almost identical to mine. Does it make any difference if you try to change the theme? As Thesis is a framework, rather than just a regular theme, it might be the culprit. Also, please make sure you removed ALL references to "blog" from the network site-settings.
    – OleVik
    Mar 15, 2011 at 10:06
  • Tried changing the theme. Still the same issue. So doesn't seem to be the issue with Thesis. But something else (and I don't know what to change other than the htaccess). Mar 16, 2011 at 7:11
  • 1
    Could you please try the following: Create a new page/post from your WP-admin, see how the permalink created compares to permalinks from pages/posts created before you changed the permalink-structure, and see if accessing the newly created page/post gives a 404 or not. If the newly created material is accessible without a 404, then the fix is very simple, but we need to know the results of this quick test first.
    – OleVik
    Mar 16, 2011 at 9:40
2

Are you testing the WordPress installation on your own server, or is it installed on a shared web host? I ask because I recently had a similar issue with a WordPress installation on my local development server. For me the issue was in my Apache configuration.

If the WordPress install is on your server, make sure that the Apache module mod_rewrite is enabled. Additionally, make sure AllowOverride is set to All rather than None in your Apache configuration file, otherwise the rewrite rules in your .htaccess file will be ignored entirely.

You can check out this post for more information, I apologize if this doesn't apply to your situation!

2
  • Installation on AWS (Amazon Web Servers). Have already tried changing AllowOverride to All in the configuration file. But doesn't seem to make a difference. Mar 22, 2011 at 8:00
  • Tried. mod_rewrite is already on. Set AllowOverride to All. But still getting the 404. Any other suggestions? Mar 22, 2011 at 16:02
1

It's worth saying that I recently encountered a problem where all links in my site began to 404 the solution turned out to be deleting the htaccess and remaking all the permalink settings. Have you tried that?

3
  • Yup tried that. No difference. As for your comment, they are going to the right place. But don't seem to find a page there :( Mar 16, 2011 at 7:10
  • The capialisation in the URL isn't different? path/To/this and path/to/this can be treated as different URL's. Also try posting your question on stackoverflow.com there are some htaccess experts over there... Mar 16, 2011 at 9:33
  • thanks but they are likely to move it here... Mar 17, 2011 at 8:46
1

The solution posted here resolved the issue.

The links work as expected now even when I use custom permalink structures!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.