Wordpress Permlinks 404 Not Found - wordpress

I have installed the latest WordPress on my EC2 Ubuntu 13.1 server.
Once I have changed the permlinks to use /%post-name%/, I encounter 404 not found for posts.
I have followed almost everything here, but still having the issue.
http://www.felfelworld.com/2013/02/12/page-not-found-permalink-wordpress/
FYI, I remember I did disable the directory listing for my apache server using SELinux (if I remember it correctly)

in order to have the Permalinks working you need:
Apache web server with the mod_rewrite module installed
The FollowSymLinks option enabled
FileInfo directives allowed
An .htaccess file
You can read more on the codex page.

Related

loading Module mod_rewrite on httpd.conf file causes "Forbidden" error on localhost

Im on a mac running Sierra 10.12.2 and apache 2.4.23
I set up a localhost environment and a virtualhost for the domain cumsa.mx and installed wordpress on it. Without getting too into detail now, some changes were made on Git that modified the wp permalinks, and hence the .htaccess file through wp.
I went to my main httpd.conf file and told it to load the module mod_rewrite as suggested by a colleague since that was necessary to be able to modify the htaccess file. Regardless of that, activating this module results in my local environment for cumsa.mx to become "Forbidden".
Can anyone think of any idea why this wouldbe the case or which permissions I need to modify and how? Thanks!

Wordpress permalink not working after upgrading to OSX El Capitan

I just upgraded my OSX to El Capitan and it messed up my apache environment.
I am running my projects in /Users/username/Sites.
After the upgrade I found out that /etc/apache2/httpd.conf was reset to default so I had to setup again by following this Link
But after fixing the configurations, when I tried accessing the wordpress site, the permalink is not working anymore.
The top page and admin page is working. But when I navigate to other page, it's not working and I am getting this error:
Not Found
The requested URL /en/ was not found on this server.
Not Found
The requested URL /workshop was not found on this server.
I already tried to update the permalink. I checked my .htaccess and it's writable. But still, the permalink won't work.
I think the one step that guide missed is to add this in your vhost:
<Directory /Users/username/sites>
AllowOverride All
</Directory>
Without the AllowOverride directive, the .htaccess file in your site's WordPress directory will be ignored.
You will also need to enable the Rewrite module as you mentioned in your comment.
I could finally fix this issue in my MacOS Catalina. And what really worked for me was. Making changes to /etc/httpd/httpd.conf file. Making Override none to All and furthermore following #CodeDiary user's instructions and uncommenting following 2 lines of code from the same file.
LoadModule include_module libexec/apache2/mod_include.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Disable mod_pagespeed (no server conf access, .htaccess doesn't work)

I have a Wordpress site that my client wants to validate perfectly (using W3C validator). One of the issues is Google's pagespeed, which seems to be enabled by default by hosting provider.
I try to disable mod_pagespeed in .htaccess file with the following, but it doesn't work for some reason:
<IfModule pagespeed_module>
ModPagespeed off
</IfModule>
I can disable it by adding "?ModPagespeed=off" to URL, but this does not solve my problem.
Is there anything else I can try? I only have access via FTP (no server conf access, no c-panel access, etc.).
Create a .htaccess file, add below text and upload using ftp program. We are also a hosting provider and use Pagespeed.
Modpagespeed Off
Your URL can accept the PageSpeed query-paramter with an off or on value.
http://www.example.com/index.html?PageSpeed=off
or
http://www.example.com/index.html?q=foo&PageSpeed=off
more here.
Which hosting provider? Can you make sure your server is Apache rather than nginx? nginx doesn't support .htaccess files, though the PageSpeed module is otherwise very similar in function.
Also check out the 'pedantic' filter: https://developers.google.com/speed/pagespeed/module/filter-pedantic, which let's you get all the speed & bandwidth benefits of PageSpeed but still have a validation-clean site.
I had the same issue with my WordPress website, I had installed it on Google Cloud, and by default, the Application installed pagespeed mod for apache. But I found the solution on the Bitnami documentation page.
Check If PageSpeed Is Enabled
execute the command or edit conf file using FTP:
nano /opt/bitnami/apache2/conf/httpd.conf
And if you find these two lines:
Include conf/pagespeed.conf
Include conf/pagespeed_libraries.conf
That means pagespeed mod is enabled.
For Disable PageSpeed
execute the same command or edit conf file using FTP:
nano /opt/bitnami/apache2/conf/httpd.conf
Comment out the following lines as below:
#Include conf/pagespeed.conf
#Include conf/pagespeed_libraries.conf
Now restart the apache server
sudo /opt/bitnami/ctlscript.sh restart apache
Note:-
As above mentioned, the command and the directory location would be changed depending on the Apache server location or your deployment application.
For a detailed article, check out the official Bitnami WordPress Documentation.

404 on Wordpress post permalinks

I'm getting a 404 when I click permalinks to my posts. I updated the .htaccess file per the documentation instructions but I still get them. That .htaccess code is in my /blog/ directory.
In my wp-admin control panel, I have it configured to do "post name" permalinks. The post permalinks work fine when I use the default, but they are 404'ing when I use the "post name" permalink setting.
Background: I'm on Apache/2.2.20 (Ubuntu) Server.
Just updating the .htaccess file would not do the trick. You need to find out if your mod_rewite.c module is enabled. If not, you need to enable it by going to console and typing in this:
sudo a2enmod rewrite
and afterwards restart your apache server.
service apache2 restart
If even that doesnt work, probably your userdir module is not enabled. For this reason you need to enable it
sudo a2enmod userdir
and then try enabling the rewrite module if still not enabled.
You can read up on this further here.
Is your mod_rewrite on?
Otherwise you'll need full URL like http://example.com/index.php/yyyy/mm/dd/post-name/
If only the "post name" setting doesn't work, it might be due to a conflict, maybe you have a post with a name that's also present on another post, page or category.
I Got Answer. It's easy only.
1) Go to WAMP logo in right-bottom of Task-bar of Windows.
2) Click left button
3) then Apache -> Apache Modules
4) Tic(select) the rewrite_module
5) that's all.

WAMP + directory alias + Drupal clean URLs

I have WAMP installed on my pc where I would like to run Drupal 6.
When I'm installing Drupal, I get the option to activate Clean URLs.
First I put my Drupal install in the www folder and I could choose to enable the clean URLs, but for backup reasons I moved it outside the www folder and created an alias the would point to the folder.
When I installed Drupal again, I couldn't choose to enable clean URLs anymore; the option was grayed out.
I would like to know why this happens; it seems some Apache module or PHP extension isn't available outside the www folder.
Just to be sure, I also tried an XAMPP install and created an alias with the some code lines as in the WAMP server but that worked, for some reason. The Apache version in WAMP isn't the same as the XAMPP install but I don't really think that is relevant.
I believe it's an config error in WAMP but I can't find out what.
Clean URLs doesn't work in the directory you copied Drupal because for that directory the directive AllowOverride is not set to All.
Drupal requires that every directives found in .htaccess files are enabled, in order to enable clean URLs; the directive AllowOverride, when set to All, allows to use all the directives that a .htaccess can contain.
The reason that in one case you can select the the option to enable the clean URLs, and in the other case is not selectable, is that Drupal, during its installation verifies the server is set to work with clean URLs, and change the form field to read-only if the server cannot support such feature.
To notice that the .htaccess file provided from Drupal can possibly need to be edited, in order to enable the clean URLs, as reported in the following comments, found inside the .htaccess file.
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

Resources