WordPress.org

Ready to get started?Download WordPress

Forums

new installation of WP 3.3.1, permalinks don't work (2 posts)

  1. anoop.kulkarni@gmail.com
    Member
    Posted 1 year ago #

    I have a new installation of wordpress on ubuntu and I was trying to play around with permalinks but other than the default it doesn't seem to work.

    * The server has write access to the .htaccess file. (I've also deleted the file forcing a regeneration)

    dev@app1:/etc/wordpress$ ll /usr/share/wordpress/.htaccess
    lrwxrwxrwx 1 root root 23 Mar 8 12:55 /usr/share/wordpress/.htaccess -> /etc/wordpress/htaccess

    dev@app1:/etc/wordpress$ ll
    total 28
    drwxr-xr-x 2 www-data www-data 4096 Mar 8 13:11 ./
    drwxr-xr-x 112 root root 4096 Mar 7 10:46 ../
    -rw-rw-rw- 1 www-data www-data 498 Mar 8 13:11 htaccess

    * Mod rewrite is working

    dev@app1:/usr/share/wordpress/wp-content$ sudo a2enmod rewrite
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    Module rewrite already enabled

    * contents of .htaccess

    RewriteEngine On
    RewriteBase w
    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]

    I've looked through similar problems raised earlier but I haven't gotten anything to work for me yet. Any help would be appreciated

  2. anoop.kulkarni@gmail.com
    Member
    Posted 1 year ago #

    fixed it!

    sudo vi /etc/apache2/sites-available/default
    
    change
    
            <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
            </Directory>
    
    to
            <Directory /var/www/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride ALL
                    Order allow,deny
                    allow from all
            </Directory>
    
    Restart apache
    sudo /etc/init.d/apache2 restart
    
    Also check your .htaccess file, for some reason my generated .htaccess had the wrong RewriteBase
    
    My folder is called wordpress under /var/www, so I changed the RewriteBase in .htaccess to
    
    RewriteBase /wordpress/

Topic Closed

This topic has been closed to new replies.

About this Topic