“Pretty” permalinks causes 404, using AWS Linux instance
-
Hey guys,
Just want to say in advance of asking for help that I am well aware that this is a common issue and I have done my due diligence in trying to solve it on my own, but with no success. I really appreciate all of you in this community for taking the time to help people like me get started with building a website.
I followed the instructions for setting up wordpress found here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
The main thing that is confusing to me is this:
“To allow WordPress to use permalinks
WordPress permalinks need to use Apache .htaccess files to work properly, but this is not enabled by default on Amazon Linux. Use this procedure to allow all overrides in the Apache document root.”
For one, we’re working with a file that isn’t literally called “.htaccess” but they refer to it as that.
Secondly, I’ve been reading elsewhere that the .htaccess file should be in the wordpress directory, not someplace else (as is the case from these instructions).
With wordpress set up and connected to my domain, I changed the permalinks setting to “postname” (removing the index.php in the process). This changes all the URLs, but all of them go to a 404:
“Not Found
The requested URL /hello-world/ was not found on this server.”I followed all the directions I could find on this, and created a .htaccess file to go in my wordpress folder (installed in the ec2 instance) with these contents exactly:
“# 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”My guess is either my .htaccess file is in the wrong location, or it is missing crucial code, or I should be editing or moving an entirely different file. In any case, I am at my wits end.
Once again just want to thank you for your help in advance.
The page I need help with: [log in to see the link]
- The topic ‘“Pretty” permalinks causes 404, using AWS Linux instance’ is closed to new replies.