Question
More WordPress permalink tomfoolery - this time on a https install:(
Hi,
I have a Wordpress site running on Ubuntu 16.04 installed using Digital Oceans wonderful 1-click install - I even have multiple domains redirecting to one primary parent domain! Not bad for a rookie! I then got some confidence and upgraded my site to https using LetsEncrypt also thanks to the useful guides available from DO. Rookie confidence increasing!
Yesterday I purchased a premium theme, installed it and moved the permalink structure to ‘post name’ and all hell broke lose as any permalinks on the homepage to my site no longer work (they now get a The requested URL <subURL> was not found on this server.).
I recognize this is something this is something that catches out a number of people so have tried various DO articles on the matter to no avail. Fixes attempted include:
- updating permissions of the main .htaccess from 664 to 666 using chmod.
- making sure is a2enmod is running using: a2enmod rewrite - it is.
- Updating /etc/apache2/sites-enabled/000-default.conf to AllowOverride (it now has the following in it:
<Directory /var/www/html/> Options FollowSymLinks AllowOverride All Order allow,deny allow from all Require all granted </Directory> - Updating /etc/apache2/sites-enabled/default-ssl.conf to AllowOverride - if I try and put the same text as added in 000-default.conf the site failts to load and delivers an 'ERR TOO MANY REDIRECTS’ message.
- Updating /etc/apache2/sites-enabled/apache2.conf to AllowOverride - as soon as I restart Apache2, the site fails to load and delivers an 'ERR TOO MANY REDIRECTS’ message.
Rookie confidence draining, any expertise thrown my way would be much-appreciated Team DO:) The most re-booted site in the world today is available at www.wealth-hack.com……
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
You’ve come a very long way for a rookie, so don’t get discouraged by a small hickup.
Can you post the contents of
.htaccess
?And how many .conf files do you have in the sites-enabled folder? Only two files has anything to do with wealth-hack.com right?
Dang it, @jtittle was faster than me again :-)
Wow, 2 people to learn from, many thanks for the quick response guys.
Firstly, to @jtittle, great call. Backup my existing .htaccess file (which had been updated in the struggle to get up to full https) and then used your advice to create a new one. Unfortunately, the same outcome as the pesky ‘not found’ message on all permalink settings except for 'plain’. In terms of sharing config, do you mean the ’.htaccess file itself? If so, this is it in all its glory (although I suspect you’ve already taken the need to re-use my old one out of the equation):
Thanks also to @hansen for the advice (and for the positive support). I’ve posted the .htaccess above but think I slightly failed to be precise in my documentation at the start of this thread. I think there are 3 .conf files in the running as the culprit! The three as follows (together with my understanding on how they might be implicated:
/etc/apache2/sites-enabled/000-default-ssl.conf - standard conf file I got the site up and running on.
/etc/apache2/sites-enabled/default-ssl.conf - the file that either compliments it or replaced it when i went to https
/etc/apache2/apache2.conf
Is it worth posting config fragments from any of these? 000 I think looks good, its when I try and change default-ssl to add in the code below it doesn’t like it (or add Override to apache2.conf).
@hansen - I can’t tell as of late, we both seem to be on the ball :-). That and there seems to be an issue with notifications / replies showing up. I shot an e-mail over to DO support about it. I even received a notification on-site that @jamesburns77 mentioned me in a response but it’s not showing up for me.
Sorry about the slow response guys, I typed in the above response twice last night, only to see them deleted due to DO’s spam filter. Ryan@digitalocean helped me get back in the game:)
I think that’s why you received the notification @jtittle, security is a wonderful thing;)
Now, onto the new comments as my education continues....