Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-28-2012, 05:23 PM   PM User | #1
XmisterIS
Regular Coder

 
Join Date: Jun 2010
Posts: 241
Thanks: 51
Thanked 6 Times in 6 Posts
XmisterIS is an unknown quantity at this point
500 Internal Server Error with mod_rewrite

I am trying to use mod_rewrite (first time I've used it, so complete and utter noob).

I've precisely followed the instructions here for "A simple mod_rewrite example" (the first and simplest example in the tutorial - I thought that would be a sensible place to start!):

http://www.workingwith.me.uk/article...ng/mod_rewrite

However, when I add the rewrite rule to my .htaccess, I get a 500 Internal Server Error reported in the web browser when I try to load alice.html or bob.html

I'm running Apace2.2 on Debian 6.0 (LAMP server).

Any ideas?

Last edited by XmisterIS; 08-28-2012 at 05:29 PM..
XmisterIS is offline   Reply With Quote
Old 08-28-2012, 05:55 PM   PM User | #2
handlegeek
New to the CF scene

 
Join Date: Aug 2012
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
handlegeek is an unknown quantity at this point
There might be some compilation error with the rewrite rule in .htaccess. You can check in the apache error log which will show the line causing the error.

You can refer for a simple example of non-www to www redirect:
http://www.ganeshbabujayaraman.com/a...and-drupal-cms
handlegeek is offline   Reply With Quote
Users who have thanked handlegeek for this post:
XmisterIS (08-29-2012)
Old 08-29-2012, 08:20 AM   PM User | #3
XmisterIS
Regular Coder

 
Join Date: Jun 2010
Posts: 241
Thanks: 51
Thanked 6 Times in 6 Posts
XmisterIS is an unknown quantity at this point
Quote:
Originally Posted by handlegeek View Post
You can check in the apache error log which will show the line causing the error.
Thanks, that gave me the info I needed to fix it with the help of Google!

It was a case of changing the AllowOverride directive to "All" in the given directory in apache2.conf
XmisterIS is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26 PM.


Advertisement
Log in to turn off these ads.