• Resolved tribalcomm

    (@tribalcomm)


    I just setup a new LAMP server in our company to get about 30 blogs hosted internally instead of various places. I have experience with WordPress, but not with MU (or network now…) and I am having an issue.

    We got the site installed using subdirectories, and I am going to map root-level domains to each blog once we start migrating. For now though, we are getting our primary company blog setup.

    It is the root blog, so the path is /. When I turn on permalinks, all the links though say /blog/… I do not ming that, but the links do not work. I get a page cannot be displayed error.

    htaccess is:

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

    If I turn on the regular ?p=123, everything works, but no pretty permalinks work.

    Any ideas?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Is mod_rewrite enabled? ??

    If so, is Apache set up to allow htaccess files to be read?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    When I turn on permalinks, all the links though say /blog/…

    FYI, this is by design. WordPress drops in /blog/ to preface your blog posts. This will be changeable one day in the future.

    Previous post disappeared into the ether..

    My problem was that Apache was not rewriting the URL. I had to add the following to the httpd.conf file
    (It can also be added to the .htaccess file if I remember correctly)

    <Directory “/var/www/wordpress”>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.example\.org\.uk [NC]
    RewriteCond %{HTTP_HOST} !^$ [NC]
    RewriteRule ^(.*)$ https://www.example\.org\.uk/$1 [R=permanent,L]
    Options FollowSymLinks MultiViews Indexes
    AllowOverride FileInfo
    Order allow,deny
    Allow from all
    </Directory>

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Cleaned up the DP ?? Sometimes you have to hit hard-refresh to show up. There’s a lot of traffic here and sometimes caching goes weird.

    Thanks.

    Looking at my post, the three lines

    RewriteCond %{HTTP_HOST} !^www\.example\.org\.uk [NC]
    RewriteCond %{HTTP_HOST} !^$ [NC]
    RewriteRule ^(.*)$ https://www.example\.org\.uk/$1 [R=permanent,L]

    are optional – they simply make sure that example.org.uk is redirected to https://www.example.org.uk

    Thread Starter tribalcomm

    (@tribalcomm)

    If so, is Apache set up to allow htaccess files to be read?

    Thanks Andrea_r, that was it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fresh network install – permalinks broken’ is closed to new replies.