Error 500 - .htaccess help

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
My .htaccess file is causing my site to give an Error 500 - Internal Server Error page and I have no clue why. I had this same .htaccess file on the same website a few months ago and it worked perfectly. Here's the file:
Code:
Options -Indexes 
ErrorDocument 400 /error?400
ErrorDocument 401 /error?401
ErrorDocument 403 /403.shtml 
#ErrorDocument 403 /403/croatian
ErrorDocument 404 /error?404 
ErrorDocument 500 /error?500
#SetEnv TZ Europe/Zagreb
<Files 403.shtml>
order allow,deny
allow from all
</Files>
AddDefaultCharset UTF-8
DefaultLanguage hr-HR
DirectoryIndex index.php naslovnica.php index.html
RewriteEngine on
RewriteRule ^([^/.]+)/glazba$ view.php?id=glazba&umjetnik=$1 [L]
RewriteRule ^([^/.]+)/([^/.]+)/glazba$ view.php?id=glazba&umjetnik=$1&album=$2 [L]
RewriteRule ^(hr|en)$ lang.php?$1 [L]
##########################Rename "page.php" to "page"##############
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^/?(.*)$    $1.php 
RewriteRule ^/?error\.php - [L]
#########################Look for "page" in SQL database, using view.php###
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ view.php?id=$1 [L]
##################Login/Logout#################################
RewriteRule ^([^/.]+)/admin$ admin.php?redirect=$1 [L]
RewriteRule ^([^/.]+)/log(in|out)$ log$2.php?redirect=$1 [L]
RewriteRule ^([^/.]+)/([^/\.]+)/log(out|in)$ log$3.php?redirect=$1&name=$2 [L]
########################################################
 
Last edited:

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
Oh, my bad, I had to take out some comments in the .htaccess file on this forum so it messed up the formatting. That's not how it is on the server. I'll fix the post right now.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
RewriteEngine on
RewriteBase /

Add the above line. The recent server reconfigurations require it.

If that doesn't work, see if you get a 500 error when requesting a normal .html or .txt file.

Lastly, checking the Error Log on the first page of cPanel will sometimes give an Apache error message relating to .htaccess file problems.
 
Last edited:

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
RewriteEngine on
RewriteBase /

Add the above line. The recent server reconfigurations require it.

If that doesn't work, see if you get a 500 error when requesting a normal .html or .txt file.

Lastly, checking the Error Log on the first page of cPanel will sometimes give an Apache error message relating to .htaccess file problems.

Oh, right. This makes sense because my "site" is actually in a folder under the main www folder. Thanks. Also I always use the error logs on my server but somehow it slips my mind when working with an FTP program like Dreamweaver.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
@merabi-master:
  1. Don't threadjack.
  2. Don't revive old threads without good reason.
  3. Search first. The register globals feature has been covered many times before.
 
Last edited:
Top