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!

3
  • 1
    got snippet of htaccess?
    – James
    Dec 12, 2017 at 16:35
  • try saving the permalinks again to flush
    – inarilo
    Dec 12, 2017 at 17:03
  • You can answer your own question. It is the preferred method, instead of adding it to your question. Dec 12, 2017 at 18:05

1 Answer 1

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 [email protected]
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.

1
  • Wow. You people downvoting are savage AF.
    – davebrener
    Dec 13, 2017 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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