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 asus backup bios blue screen boot bsod crash dell dns driver drivers email error freeze games graphics card hard drive hardware help ! install internet internet explorer itunes laptop malware mcafee modem motherboard mouse network networking problem router sound spyware startup system restore trojan usb video virus vista wifi windows windows 7 windows 7 32-bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: HTTP 500 Internal Server Error Caused By .htaccess

Closed Thread
 
Thread Tools
seanmt's Avatar
Computer Specs
Senior Member with 129 posts.
 
Join Date: Oct 2004
Location: Middlesbrough, UK
Experience: Intermediate
08-Mar-2010, 02: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 638 posts.
 
Join Date: Apr 2009
Location: USA, Canada, Europe
Experience: Advanced
09-Mar-2010, 09: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 my advice? Send me a private message (PM), link to your post, and I'll come help you.

~ My quick fixes for: CD / DVD Burning ~ VCR-to-DVD Help ~ Digtal DSLR Photo Advice ~ Making Websites
scottdeagan's Avatar
Computer Specs
Member with 54 posts.
 
Join Date: Feb 2010
Location: London
Experience: Beginner
09-Mar-2010, 12: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
Distinguished Member with 3,635 posts.
 
Join Date: Oct 2006
09-Mar-2010, 12: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
Senior Member with 129 posts.
 
Join Date: Oct 2004
Location: Middlesbrough, UK
Experience: Intermediate
09-Mar-2010, 05: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 6,246 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
09-Mar-2010, 07:24 PM #6
Cool. How did you find that out?

Peace...
seanmt's Avatar
Computer Specs
Senior Member with 129 posts.
 
Join Date: Oct 2004
Location: Middlesbrough, UK
Experience: Intermediate
10-Mar-2010, 11:47 AM #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 6,246 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
10-Mar-2010, 11:55 AM #8
Sounds good.

Peace...
Closed Thread

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


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 10:12 PM.
Copyright © 1996 - 2010 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.