You are not logged in.
Hey, I'm working on migrating a wordpress site from one server to another and I have it mostly working, the home page loads fine but when I try to browse to other pages (eg: example.com/info-page/) I get a 404 error from the web server even though mod_rewrite is enabled and I have the following .htaccess in the wordpress directory:
# 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
I can provide other config info if needed, just let me know. This has had me confused for a couple hours now and my brain is just ready to give up.
Last edited by ill (2013-01-24 03:03:25)
Offline
On my personal Arch Linux server I use Apache, I use WordPress, and I use mod_rewrite, and I'd be happy to share my configuration with you, but please bare in mind I have no idea how they work or what they mean.
.htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
I thought I also added something in my Apache settings, but I don't have access to my server at the moment.
EDIT: I found it. In "/etc/httpd/conf/httpd.conf":
LoadModule rewrite_module modules/mod_rewrite.so
Last edited by drcouzelis (2013-01-23 01:42:19)
Offline
Appreciate the post, but that's exactly the same .htaccess I have and I have made sure mod_rewrite is enabled in the apache config.
Offline
that's exactly the same .htaccess I have
No it isn't... RewriteBase and RewriteRule are different. I thought those were the important parts...
Offline
Your wordpress install is in /wordpress/, mine is in the root directory (/). Exact same config.
Edit: Apache config "AllowOverride None" -> "AllowOverride All" fixed it.
Last edited by ill (2013-01-24 03:03:52)
Offline
This post also helped me, but I thought a little more detail might help others.
Within <Directory> section of the /etc/httpd/conf/httpd.conf file found "AllowOverride None". Changed this to "AllowOverride All", but it didn't help.
Problem was virtual hosts. So instead, went to the <Directory> section within the /etc/httpd/conf/extra/httpd-vhosts.conf file and made change there.
Probably obvious to most, but took me a little extra time to figure out.
Offline