+ Reply to Thread
Results 1 to 7 of 7

Thread: Error 500 - .htaccess help

  1. #1
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Exclamation Error 500 - .htaccess help

    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 by espfutbol98; 08-14-2010 at 04:53 PM. Reason: error in formatting

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Error 500 - .htaccess help

    Quote Originally Posted by espfutbol98 View Post
    Code:
    Options -Indexes ErrorDocument 400 /error?400
    These options should be on separate lines.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: Error 500 - .htaccess help

    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.

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Error 500 - .htaccess help

    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 by descalzo; 08-14-2010 at 04:57 PM.
    Nothing is always absolutely so.

  5. #5
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: Error 500 - .htaccess help

    Quote Originally Posted by descalzo View Post
    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.

  6. #6
    merabi-master23 is offline x10Hosting Member merabi-master23 is an unknown quantity at this point
    Join Date
    Apr 2011
    Posts
    1

    Unhappy Re: Error 500 - .htaccess help

    Hello, please enable register globals, .htaccess code: php_flag register_globals On

  7. #7
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Error 500 - .htaccess help

    @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 by misson; 04-19-2011 at 04:06 AM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. htaccess may cause 500 error.
    By janokchen in forum Free Hosting
    Replies: 2
    Last Post: 08-04-2010, 01:32 PM
  2. .htaccess causing 500 internal server error
    By marc2003 in forum Free Hosting
    Replies: 2
    Last Post: 10-16-2007, 06:29 AM
  3. .htaccess - 500 Internal Server Error
    By deadimp in forum Free Hosting
    Replies: 5
    Last Post: 09-03-2007, 04:12 PM
  4. Replies: 2
    Last Post: 10-16-2005, 12:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers