Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Web Design & Development
Tag Cloud
access acer asus bios bsod computer crash drive driver drivers error ethernet excel freeze games gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: HTTP 500 Internal Server Error Caused By .htaccess

Reply  
Thread Tools
seanmt's Avatar
Computer Specs
Member with 135 posts.
 
Join Date: Oct 2004
Location: Middlesbrough, UK
Experience: Intermediate
08-Mar-2010, 03:06 PM #1
Solved: HTTP 500 Internal Server Error Caused By .htaccess
I am new to using .htaccess files and have beed using mod_rewrite.

But now the index page of my website will not load. I just get HTTP 500 Internal Server Error.

Other pages work. It is just the index that doesn't.

The contents of my .htaccess file:

Code:
<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   Options +Indexes
   RewriteEngine On
   
   RewriteCond %{SCRIPT_FILENAME} !-f
   RewriteCond %{SCRIPT_FILENAME} !-d
   
   
   RewriteRule ^([a-z]+)/([a-z]+)$ $1.php?do=$2
   RewriteRule ^([a-z]+)/([0-9]+)$ $1.php?do=$2
   RewriteRule ^([a-z]+)$ $1.php 
   RewriteRule logout login.php?logout
   RewriteRule steam create.php?do=steam 
   
   RewriteCond %{http_host} ^www\.fmcard\.co\.uk [NC]
   RewriteRule ^(.*)$ http://fmcard.co.uk/$1 [R=301,NC]
   
</IfModule>
lordsmurf's Avatar
Computer Specs
Senior Member with 1,156 posts.
 
Join Date: Apr 2009
Location: USA, Canada, Europe
Experience: Advanced
09-Mar-2010, 10:04 AM #2
Disable the custom errors messages on the server account.
You need to know where the error is in the code, not read the generic "hidden" message.

Some scripts disable it internally, if the server is set to show it.

"500" may as well read "Help me, I've fallen and I can't get up" -- it's a generic nothing.
__________________
.
~ Want more of my advice? See my other past posts on these topics:
~ DVD Burning Problems / VCR-to-DVD Help / Digital Photo Tips / Making Websites ~
scottdeagan's Avatar
Computer Specs
Member with 54 posts.
 
Join Date: Feb 2010
Location: London
Experience: Beginner
09-Mar-2010, 01:36 PM #3
You could tail your error log in a terminal. If you are using default install of Apache, it would be something like:

tail -f /var/log/apache2/error.log

Have you successfully enabled mod_rewrite and used it in the past? In Ubuntu, you would enable mod_rewrite by entering:

a2enmod rewrite
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,637 posts.
 
Join Date: Oct 2006
09-Mar-2010, 01:58 PM #4
I had a lousy host and they didn't like certain .htaccess commands.

Try commenting those out one by one till you find the culprit. Then you can either come back here, talk to your host, or ask Google his opinion.
seanmt's Avatar
Computer Specs
Member with 135 posts.
 
Join Date: Oct 2004
Location: Middlesbrough, UK
Experience: Intermediate
09-Mar-2010, 06:31 PM #5
Sorry to waste everyones time but It had nothing to do with the htaccess. I had simply made an error in one of my echo statements. I had a trailing " where none was needed.

PHP Code:
echo $variable "; 
I just assumed it was htaccess as I had been fiddling with it when I noticed it went down.
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
09-Mar-2010, 08:24 PM #6
Cool. How did you find that out?

Peace...
seanmt's Avatar
Computer Specs
Member with 135 posts.
 
Join Date: Oct 2004
Location: Middlesbrough, UK
Experience: Intermediate
10-Mar-2010, 12:47 PM #7
I tried renaming the index.php file to something else and when it still wasn't working I realised it was a problem with that page so I had a good look through and spotted the error.
tomdkat's Avatar
Computer Specs
Distinguished Member with 7,127 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
10-Mar-2010, 12:55 PM #8
Sounds good.

Peace...
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:38 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.