• Resolved Jelly92

    (@jelly92)


    I’ve just moved OS to Ubuntu and have brought over some themes I created. I want to make some adjustments to them. So, I created sites with virtual hosts and added the appropriate theme for each. I have tested two now, and both have the same problem: pages created end up with the url:
    http://website/wordpress/index.php/page/

    Which I’d expect to be (and has in the past):
    http://website/wordpress/page/

    I suppose it wouldn’t be such a problem, if it wasn’t for the fact my page templates don’t work, presumably because they’re not supposed to recognise /index.php/pagename.

    I searched and couldn’t seem to find anyone else with the same problem. Can anyone help?

    Thanks.

    EDIT –
    I changed the permalinks setting to ‘default’ and then to ‘post name’ – it has taken index.php out, but now I’m getting a 404 not found error despite the pages existing?
    I’ve created a .htaccess file (there wasn’t one before) which looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    # END WordPress

    (the second block is the code WordPress provided when I changed the permalinks settings)

Viewing 1 replies (of 1 total)
  • How you configure the virtual hosts? I think you might need the proper Directory directive. I do it like this for WordPress:

    NameVirtualHost *:80
    NameVirtualHost *:443
    
    <VirtualHost *:80>
         ServerAdmin webmaster@manageablesites.com
         ServerName manageablesites.com
         ServerAlias www.manageablesites.com
         DocumentRoot /srv/www/manageablesites.com/public_html/
         ErrorLog /srv/www/manageablesites.com/logs/error.log
         CustomLog /srv/www/manageablesites.com/logs/access.log combined
     <Directory />
      Options FollowSymLinks
      AllowOverride All
     </Directory>
    </VirtualHost>
    
    <VirtualHost *:80>
        ServerAdmin webmaster@hugthoughts.com
        ServerName hugthoughts.com
        ServerAlias www.hugthoughts.com
        DocumentRoot /srv/www/hugthoughts.com/public_html/
        ErrorLog /srv/www/hugthoughts.com/logs/error.log
        CustomLog /srv/www/hugthoughts.com/logs/access.log combined
     <Directory />
      Options FollowSymLinks
      AllowOverride All
     </Directory>
    </VirtualHost>

Viewing 1 replies (of 1 total)

The topic ‘Permalinks include 'index.html' where they shouldn't’ is closed to new replies.