I’ve upgraded to WordPress 4.9 and now all of my permalinks seem to include /index.php/ before the page name. This is not how I set up the permalinks originally.

All I want displayed is www.myurl.com/subpage NOT www.myurl.com/index.php/subpage.

I’ve checked my htaccess file and it appears to be fine, I’ve also disabled all plugins and have checked my Permalinks structure in the WordPress backend and still have no solution to the issue.

htaccess file is as follows:

# 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>
# END WordPress

If anyone has any insight to what may be causing this issue, I’d appreciate it. Thank you!

1 Answer
1

Found the issue! Seems that the <Directory> in the .conf file in Apache2 was not configured correctly.

An example of a correctly configured .conf file is as follows:

# domain: exampleurl.com
# public: /var/www/html/exampleurl.com/public_html/

<Directory /var/www/html/exampleurl.com/public_html>
Require all granted
AllowOverride All
</Directory>

<VirtualHost *:80>
ServerAdmin support@exampleurl.com
ServerName  exampleurl.com
ServerAlias www.exampleurl.com

DocumentRoot /var/www/html/exampleurl.com/public_html

ErrorLog  /var/www/html/exampleurl.com/logs/error.log
CustomLog /var/www/html/exampleurl.com/logs/access.log combined
</VirtualHost>

Including AllowOverride All seems to fix the permalink issue.

Remember to run service apache2 reload in Terminal once you overwrite your .conf file.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *