Wordpress permalink not working after upgrading to OSX El Capitan - wordpress

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

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 Permlinks 404 Not Found

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.

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 /

What is misconfigured when Drupal homepage works ok, but all links fail?

I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base_url in sites/default/settings.php to the new filesystem path. As a result, The homepage works just fine, and all hyperlinks on the homepage go where they should ( example.com/bar/content/ ). Unfortunately, clicking on any the hyperlinks sends me to an error page:
Not Found
The requested URL /foo/index.php was not found on this server.
This looks like a misconfiguration, but all sources I can see only site the .htaccess file and $base_url as possible points of failure. What else should I be checking? Thanks.
I just looked around and found the error in my configuration.
There was a joomla Page before, and I wanted to replace it with my (local) new version (drupal) of the page.
I renamed the old directory and copied all files to the same directory again, so my vhost will work with the new drupal page.
Looking for hours, I found that in my vhost configuration I didn't allow Overriding:
<Directory /var/www/xxx/>
Options -Indexes FollowSymLinks MultiViews
**AllowOverride None**
Order allow,deny
allow from all
</Directory>
AllowOverride None --> AllowOverride All
And it just works... :-)
Props to Shoaib Nawaz for suggesting that I look at my .htaccess file again. My RewriteBase variable within my .htaccess file was still referencing the old location.
Old configuration:
# RewriteBase /foo
New configuration:
RewriteBase /bar
Note that if 'foo' was a default directory name, such as 'drupal' or 'acquia', you will need to uncomment the RewriteBase line and modify it to match your new (nondefault) directory name. This was the case for me, so I didn't even think to check this aspect.
Try clearing your cache. You may have to do it manually in the database. Here's a page that gives a few options: http://drupal.org/node/42055. Here's another way of doing it: http://drupal.org/node/152983#d6.
Which OS and database are you using? Do you have access to the shell and a management interface for your database?
It sounds as through you have hardcoded /foo/ to various resources, and you'll have to search through your database and source files to find these settings.
I did a quick search on Google for "moving an installed drupal directory, and the from what I read, it seemed rather difficult. It would seem that you're not only one with this issue.
http://www.google.co.uk/m/search?pbx=1&aq=f&oq=&aqi=-k0d0t0&fkt=67&fsdt=9875&q=move+an+installed+drupal+directory
I just had the same problem. In addition to Max`s answer, Check the httpd.conf file in the apache settings directory if rewrite module is enabled or enable it from Cpanel.
Drupal site worked but when I tried to access Drupal's back-office, I couldn't, so, in order to solve thethis issue, I`ve also enabled in the production server the following modules as they were enabled in my test server:
access_compat_module
actions_module
alias_module
allowmethods_module
asis_module
auth_basic_module
auth_digest_module
authn_core_module
authn_file_module
authz_groupfile_module
authz_user_module
autoindex_module
cache_disk_module
cache_module
cgi_module
dir_module
env_module
file_cache_module
include_module
isapi_module
log_config_module
mime_module
negotiation_module
rewrite_module
setenvif_module
userdir_module
vhost_alias_module
And finally, it worked. I hope this will be helpful. Greetings! :D

Resources