• Resolved rmikedown

    (@rmikedown)


    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.

    • This topic was modified 7 years ago by rmikedown.
    • This topic was modified 7 years ago by rmikedown.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The default for httpd is to ignore .htaccess.

    To enable it, add this to your config file for this site:

    <Directory /path/to/wordpress>
      AllowOverride All
    </Directory>

    then restart httpd.

    Thread Starter rmikedown

    (@rmikedown)

    Hello Steve,

    Everything seems to be working. You probably just saved me several hours of headaches! Thank you so much for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Pretty” permalinks causes 404, using AWS Linux instance’ is closed to new replies.