Thursday, September 13, 2007

Checklist for WordPress “Pretty Permalinks” on Ubuntu

  1. Enable mod_rewrite
    cd /etc/apache2/mods-enabled
    sudo ln -s ../mods-available/rewrite.load rewrite.load
  2. Change to AllowOverride All in userdir
    sudo vim userdir.conf
    Example of my userdir.conf:
    <Directory /dir/to/wordpress>
    AllowOverride All
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    </directory>
  3. Customize Permalink Structure in WordPress admin page
  4. Copy .htaccess in WordPress directory if not created.
    cd /dir/to/wordpress
    sudo vim .htaccess

    Should be something linke this:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

No comments:

Post a Comment