Author Topic: mod_rerwrite not working  (Read 7781 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
mod_rerwrite not working
« on: April 30, 2018, 11:52:53 PM »
Hi!
I installed CentOS Web Panel and I am unable to get mod_rewrite to work with a WordPress installation (for instance, I get a '403' - Forbidden when editing a post).
I have looked here and elsewhrer and tried all the fixes.
The Permalinks setting keeps putting index.php in the structure.
I have edited the httpd.conf file to have "AllowOverride All"; no change.
Recompiled Apache rewrite is enabled in the compiler.
httpd -M shows module is active "rewrite (shared").
php info shows NO loaded modules.
The WordPress .htaccess file is correct.
Disabling all plugins has no effect.
Posts are displaying correctly without the "index.php"
There are no upstream .htaccess files.
httpd seems to be correct:
Vhosts seems to be correct:
There seems to be two (2) versions of mod_rewrite:
one at /usr/local/apache/modules 96,344 b
another at:/usr/lib64/httpd/modules 69,056
I'm wondering if this is some sort on Nginx issue.
Thanks!
« Last Edit: May 01, 2018, 12:01:55 AM by abilicom »
Brian Brown, Ph.D.
"Geeking for over 55 Years!"

Offline
*
Re: mod_rerwrite not working
« Reply #1 on: November 04, 2018, 04:44:44 AM »
Saaaaaaaaaaaaaaaaaaame thing, been staring at it for hours
Did you fix this?
Thanks

Offline
*
Re: mod_rerwrite not working
« Reply #2 on: November 04, 2018, 04:48:26 AM »
What I also noticed is that on phpinfo() the Apache2 handler section is missing, so I dont see the module loaded there, I read some notes that that can happen if PHP is in fastcgi mode though as far as I can tell it is not in this mode
I also see httpd -M shows module is active "rewrite (shared").
Wordpress Re-write is just not working,
Wordpress URL's show the index.php
Did you fix this? thanks

Offline
*
Re: mod_rerwrite not working
« Reply #3 on: November 12, 2018, 03:16:56 PM »
I was having the same problem.

The issue is with mod_security. At least was for me.

While I was having mod_security enabled, wordpress installation and/or plugins can't make changes to wp-config.php and .htaccess files too and w3totalcache plugin was showing that url_rewrite is not enabled.

When I disabled the mod_security everything was working again. no index.php in permalinks and the changes to the config file and .htaccess was made automatically.

Ps. I haven't found the ids i need to put in mod security disabled rules yet cause I reinstalled the server.
Ps2. Try unistall the mod_security and check if the problem is gone and then find the rule to use in mod_security.