Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Mar 10, 2010 5:03 am 
Offline
Senior Newbie

Joined: Wed Mar 10, 2010 4:58 am
Posts: 14
I must be missing something here, but I cannot get the standard wordpress mod rewrite hataccess file to work. Here is what seems relevant:

Excerpts from my httpd.conf file
Code:
LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride All
AccessFileName .htaccess


With those settings it seems like the Apache config looks good, so here is the .htaccess file:

Code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress



I appreciate any help that anyone might have. Thanks!!!


Top
   
 Post subject:
PostPosted: Wed Mar 10, 2010 6:49 am 
Offline
Senior Member

Joined: Sat Nov 15, 2008 4:24 pm
Posts: 55
Location: Czech Republic
You don't want to have ".c" suffix in IfModule clause. You need to mirror module name from LoadModule section, i.e. rewrite_module.


Top
   
 Post subject:
PostPosted: Wed Mar 10, 2010 10:55 am 
Offline
Senior Newbie

Joined: Wed Mar 10, 2010 4:58 am
Posts: 14
Thanks for the reply, but that is working for me either, here is what I've tried so far in addition to the default file:

Code:
# BEGIN WordPress
<IfModule rewrite_module>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

and
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


Top
   
 Post subject:
PostPosted: Wed Mar 10, 2010 11:45 am 
Offline
Senior Member

Joined: Sat Nov 15, 2008 4:24 pm
Posts: 55
Location: Czech Republic
cyphun wrote:
Thanks for the reply, but that is working for me either
I guess you mean it does not work for you.

Ok then, keep with the latter (without IfModule) and post your error. If it is 404, 403 or something like that, you have error in your rule (denied access to index.php or missing file). If it is 50x, you have a syntax error or not loaded module.

Also try if your .htaccess is working properly - try to deny or allow access to all and see if something changes.

You do not write which distro you use but is it possible you don't have rewrite module at all (no .so file) or it isn't in specified directory?

Don't forget to check /var/log/apache/error_log to see if there isn't any clue.


Last edited by drake127 on Wed Mar 10, 2010 12:59 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Wed Mar 10, 2010 12:08 pm 
Offline
Senior Newbie

Joined: Wed Mar 10, 2010 4:58 am
Posts: 14
Alright, so I figured out the issues with all of this. First, it isn't a good idea to transfer a website between servers when you are half asleep :P

Second, the issue was with my apache configuration. Although I had AllowOverride All set near the area of the config file that talks about htaccess, that wasn't the right spot. I needed to also set the the AllowOverride All within the <Directory /> area:

Code:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>


Lastly for anyone having issues with the format of the actual htaccess file this is what I ultimately ended with in my htaccess file:

Code:
# BEGIN WordPress
<IfModule rewrite_module>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group