Motivation: in my particular case I moved a WordPress site from Bluehost to amazon’s EC2. Permalinks were not working.
Solution: I had to modify the override option from my httpd service.
- Go to
/etc/httpd/confand edithttpd.conf1 2 3 4
<Directory /> Options FollowSymLinks AllowOverride All </Directory>
<Directory /> Options FollowSymLinks AllowOverride All </Directory> - Change also
AllowOverrideif it is set toNone.1 2 3 4 5
# AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All
# AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All - I you haven’t created it yet, place in the root directory of your wordpress installation a
.htaccessfile with the following contents:1 2 3 4 5 6 7 8 9 10 11
# 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
# 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
Source: this post.