Bouncer
Bouncer

Reputation: 13

confounding htaccess errors leading to error code 500

SOLVED

Answer: OK. So I've figured it out. I'm using shared hosting and the host has suExec enabled. It won't allow files to have permissions other than default (755 for folders, 644 for files etc). It was a simple matter of changing the permissions and it started working just fine!

Thanks a lot for all of your help!


Question:

I apologise ahead for the long post. I have two directories - the main one and a subdirectory called cms. Here is the .htaccess code for the main directory

Options +FollowSymLinks
RewriteEngine on

RewriteRule (.*).php - [L,QSA]
RewriteRule (.*).gif - [L,QSA]

RewriteRule ^cms$ - [L]

RewriteRule ^([^/]+)/([^/]+)/?$ index.php?page=$2 [L,QSA] 
RewriteRule ^([^/]+)(/)?$ index.php?page=$1 [L,QSA] 
RewriteRule ^(.*)(/)?$ index.php?page=home [L,QSA] 

However, when I try to access something like

http://website.com/cms/index.php, I get a 500 Internal error. All the files in the directory have the right perms (I even tried 777 to no avail). I've also tried changing the order, no luck there too.

I've tried with different combos but haven't had any luck.

Any help will be greatly appreciated.

PS. In case it wasn't clear enough, I'm very much a noob.


edit

OK. So I've found the error log and here is what I see under it:

[Tue Jun 14 16:29:19 2011] [error] [client 1.1.1.1] File does not exist: /home/user/public_html/main_dir/500.shtml
[Tue Jun 14 16:29:19 2011] [error] [client 1.1.1.1] SoftException in Application.cpp:256: File "/home/user/public_html/main_folder/cms/index.php" is writeable by group

Does that yield any clues?

Upvotes: 0

Views: 824

Answers (1)

geekuality
geekuality

Reputation: 350

I recommend setting Apache's RewriteLogLevel and checking logs for error.

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel

Upvotes: 1

Related Questions