• Resolved PurdueGuy

    (@purdueguy)


    Working on a website for a School district using WordPress Multisite 3.0.1. There are 7 sites within this WordPress install, one for the district, and one for each of 6 schools. The home page for each site shows properly, however if you try to go to a page or post within a site, it gives a 404 error.

    Unfortunately it’s difficult to point you to the site so you can see for yourself, as it’s been installed on a school-owned forum and DNS settings have not been resolved. So, while the site is being built at snakeriver.org, if you go there you will see the old site. Viewing the page requires editing the hosts file buried in a system folder to point to the server’s IP when typing in the address. Not sure if this is contributing to the issue, and perhaps the site would display properly with DNS settings resolved.

    Thoughts on things to check?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter PurdueGuy

    (@purdueguy)

    I should add – at one point we had only the district site set up, before we figured out multisite setup. During that time, pages and posts in the district site worked.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What’s in your .htaccess file, and are you using subdomains or subfolders for MultiSite?

    Check Permalink’s

    Thread Starter PurdueGuy

    (@purdueguy)

    I tried rebuilding permalinks earlier with no change (switched to a different style, checked, switched back again, checked).

    The district site is on the main domain, the 6 school sites are on subdomains.

    ipstenu – contents of the .htaccess file are below:

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

    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-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L][/code]

    Thread Starter PurdueGuy

    (@purdueguy)

    ignore the [code][/code] tags, they are not in the .htaccess file, I’m used to different forum software…

    Thread Starter PurdueGuy

    (@purdueguy)

    AH HA! Nevermind – somehow the .htaccess file had gotten renamed .htacces (missing an s).

    All better! (After a few days of trying different things here & there…)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    it’s backticks here ?? No worries.

    Try this .htaccess instead. The one you have is the subfolder one, and it has some extra lines in there that may be goobering it up. Actually … it looks like you have BOTH in there!

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress
    CrtWatcha

    (@crtwatcha)

    Thanks this was helpful. I was getting a 404 error for all permalinks, posts, and comments.

    I noticed I was missing the .htaccess file.

    I couldn’t download it, it’s server system file. I had to copy and paste its contents into a text file that I set as Plain Text and saved it as Unicode(utf-8) but because it is a system file I had to name it something like 1.htaccess.txt because it won’t save as .htaccess on your local harddrive.

    I then uploaded 1.htaccess.txt to my public_html folder, then changed the name of the file to .htaccess and now all my permalinks, posts, and comments, and users are back.

    Hope that helps some newbies.

    Hi, I came accross this discussion when I was searching about how to fix my site after a DNS switch over from a hosted test site to a live site.

    None of my pages or posts were working (500 error code), but homepage working and admin login working fine.

    I changed the site URL in the Database through phpMyAdmin, and made this change to my .htaccess file and now it all works fine.

    So thanks @ipstenu for your help with the code for the .htaccess file. Worked a treat for me.

    I guess the .htaccess file doesn’t get updated from the intial set up of the WP install, so obviously when you have changes such as a DNS switch over, it will stop working.

    It’s simple to understand now, but anyone new to WP and such might not know this. So hope my contribution helps.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I guess the .htaccess file doesn’t get updated from the intial set up of the WP install, so obviously when you have changes such as a DNS switch over, it will stop working.

    Correct, it DOES NOT get updated. But it TELLS you that, actually.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Pages/posts don't work, only home page’ is closed to new replies.