2

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
    got snippet of htaccess? – James Dec 12 '17 at 16:35
  • try saving the permalinks again to flush – inarilo Dec 12 '17 at 17:03
  • You can answer your own question. It is the preferred method, instead of adding it to your question. – Nicolai Dec 12 '17 at 18:05
0

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.

  • Wow. You people downvoting are savage AF. – davebrener Dec 13 '17 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.