Support » Networking WordPress » cant get prettylinks working

  • Ubuntu fresh install

    After reading the sticky and other sites, this still is causing me problems.

    From what I gather i need to do 2 things to get this working.

    1. mod_rewrite
    2. .htaccess

    1. I have installed mod_rewrite http://blogs.spc.ox.ac.uk/info.php
    2. .htaccess is placed in /var/www (correct?) and looks like..

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    Option +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPressRewriteEngine On

    What am I doing/not doing?

Viewing 9 replies - 1 through 9 (of 9 total)
  • *wanting subdirectories

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    Did you set up the network yet? It gives you code to put in the .htaccess file for the subfolder blogs. What you pasted isn’t it.

    The .htaccess file should be in the same folder as your wp-config.php file.

    I’ve amended the .htaccess with the following:

    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]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
            Option +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    i’ve tided up the replacation line, so there is no repeats.

    still no luck.

    i have installed network and now got the relevant contents (i believe?) in the .htaccess

    where next to look?

    thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    For subdirectories (including your follow symlinks call) you’d want this:

    Option +FollowSymLinks
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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]
    </IfModule>
    # END WordPress

    Just to make sure 🙂

    Once you have that in, can you get to domain.com/subsite/wp-admin?

    Thanks for that ipstenu. Unfortunately still no movement. http://blogs.spc.ox.ac.uk/matt/ still 404’ing.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    http://blogs.spc.ox.ac.uk/?p=8 works though…

    Can you turn on pretty permalinks on your MAIN blog? The problem may be that your .htaccess file isn’t being read by your server, which you need to punt mod_rewrite into action for that. Ask your host if mod_rewrite is enabled for your account on your server.

    I’d be the person to check to see if mod_rewrite does that, will have a look to see to make sure thats the case. Any clues where to look?

    I’ve turned it on and now it doesnt’t work, which would seem that .htaccess isn’t being read?

    Thanks again for your help so far 🙂

    Andrea Rennick

    (@andrea_r)

    Customer Care at Copyblogger Media and Studiopress

    AllowOverride FileInfo Options

    🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘cant get prettylinks working’ is closed to new replies.