sylvest Posted October 12, 2010 Posted October 12, 2010 Hi, I'm just starting to get to grips with the rewriting engine. I'm getting server "500" errors. Where does the rewriting engine write its log messages? Can I change this? Can I change the debug level? It doesn't seem to accept RewriteLog or RewriteLogLevel commands in the .htaccess file. Can you suggest any otehr ways of finding out what's happening while it's processing my .htaccess file? Thanks - Rowan Quote
TCH-Bruce Posted October 12, 2010 Posted October 12, 2010 Usually a "500" error usually denotes a permissions problem. Since the server is doing the writing the file requires read/write access for everyone (ie: 666). And make sure the file if uploaded was uploaded in ASCII mode and not Binary. Quote
sylvest Posted October 12, 2010 Author Posted October 12, 2010 Thanks for your suggestion. Do you mean the permissions of the .htaccess file? It was 644. I've changed it to 666 but it makes no difference to the 500 error. In any case, why would the server be _writing_ to the .htaccess file? Thanks - Rowan Quote
sylvest Posted October 12, 2010 Author Posted October 12, 2010 (edited) Is it not possible to get some logging from mod-rewrite? That would make it so much easier! Otherwise I'm reduced to trying things at random and hoping that eventually one of them will work... Thanks - Rowan Edited October 12, 2010 by sylvest Quote
TCH-Dick Posted October 12, 2010 Posted October 12, 2010 It doesn't seem to accept RewriteLog or RewriteLogLevel commands in the .htaccess file. Can you suggest any otehr ways of finding out what's happening while it's processing my .htaccess file? These directives are not allowed in .htaccess, please see httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelog . Most errors will show up in your cPanel under Logs > Error Log, if you are not able to find an issue there you will need to open a ticket. Quote
OJB Posted October 12, 2010 Posted October 12, 2010 The times I have experienced 500 internal server errors is when I have syntax errors within the .htaccess file itself. If you want, send me the .htaccess file you are using and I will see if I can work out what is wrong. Not saying I am an expert, but I do work with them on a daily basis at work. Quote
TCH-Bruce Posted October 12, 2010 Posted October 12, 2010 In any case, why would the server be _writing_ to the .htaccess file? Maybe I misunderstood your issue. No, do not set your .htaccess file to 666 permissions. Quote
sylvest Posted October 12, 2010 Author Posted October 12, 2010 The times I have experienced 500 internal server errors is when I have syntax errors within the .htaccess file itself. If you want, send me the .htaccess file you are using and I will see if I can work out what is wrong. Not saying I am an expert, but I do work with them on a daily basis at work. That's a fine offer, thanks. I may do this if I get desperate, but a better solution would be for me to have the tools needed to debug these issues myself. I'm beginning to have a bit of success by adding some rewrite rules to report the values of variables etc. in the returned headers. Very tedious but better than no visibility at all... For the moment I'm struggling on with trying to understand how all this works and get it right... Rowan Quote
TCH-Dick Posted October 12, 2010 Posted October 12, 2010 but a better solution would be for me to have the tools needed to debug these issues myself. Unfortunately that type of access is not provided in a shared environment as it just results in problems for other users. If you continue to have issues, feel free to open a ticket with the help desk. Short of trying to use htaccess to host more than one site, which is a TOS violation, we will gladly assist with any rewrite issues. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.