hey there
a thought on this, are you able to access /wp-login.php or /wp-admin on the centos server?
if yes, try resaving your permalink structure (Dashboard->Settings->Permalinks) and take a look at the generated .htaccess file.
then i’d use a toold like diffchecker to compare each htaccess file. is the .htaccess file generated when you save permalinks on the centos box the same as the one on your MAMP server?
if you are unable to access /wp-admin, temporarily remove your .htaccess file and/or place the default settings from here in it
# 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
Thanks for the reply bernbe01…
I am able to get to wp-login. I renamed the existing .htaccess to .htaccesstemp and then went to the Permalinks settings and saved. I get the message that the permalink structure has been updated, but the .htaccess file is not created in /var/www/html on the Centos system. I even changed permissions on that directory to 777 just to be sure I could write to it.
I feel like I’m missing something pretty basic here.
This is the WordPress section of the functioning production .htaccess file:
# BEGIN WordPress
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</ifModule>
# END WordPress
how’d it go with *just* the .htaccess lines provided?
you could also try resetting all perms to default 755 for dirs and 644 for files using:
*be sure to change the path to match yours
# find /path/to/wordpress -type d -exec chmod 755 {} \;
# find /path/to/wordpress -type f -exec chmod 654 {} \;
is the folder structure owned by the apache user?
when in /var/www do
# ls -al
and look at the owner for html dir
then cd into html and do the same
ensure that the user is the same as who apache runs as, to find that out
# ps aux |grep apache
or
# ps aux |grep httpd
i’m still thinking permissions, but based on what we find here we may go another route 😛
Finally figured it out.
I forgot to change the AllowOverride parameter for /var/www/html on the Centos system. Made that change and everything is looking good.
Thanks for the help bernbe01 … It was a good reminder to make the permissions changes, etc.
nice work finding&fixing that!
thanks for updating the thread! feel free to mark it as resolved if you are all set
cheers!