Results 1 to 2 of 2

Thread: Internal server error 500 - .htaccess?

  1. #1
    reim is offline Utente AlterBlog
    Join Date
    Feb 2021
    Posts
    11

    Default Internal server error 500 - .htaccess?

    I get the internal server error on my site's register page when my .htacess file doesn't have RewriteBase /

    But if it does have it, then my register page doesn't load at all, and loads back to the home page no matter what link I click on the site!

    Here is my .htaccess file:

    php_flag display_errors off

    # This controls what config options to use.
    # SetEnv RELEASE_MODE DEV

    RewriteEngine On
    http://reim.altervista.org = /

    # These are the real folders.
    RewriteRule ^resources/(.*)$ resources/$1 [L]
    RewriteRule ^docs/(.*)$ docs/$1 [L]

    # Specific, prettier URLs.
    RewriteRule ^profile/([0-9]+) index.php?page_slug=profile&user_id=$1 [NC,L]
    RewriteRule ^pet/([0-9]+) index.php?page_slug=pet&pet_id=$1 [NC,L]
    RewriteRule ^edit-pet/([0-9]+) index.php?page_slug=edit-pet&pet_id=$1 [NC,L]
    RewriteRule ^shop/([0-9]+) index.php?page_slug=shop&shop_id=$1 [NC,L]
    RewriteRule ^notice/([0-9]+) index.php?page_slug=notice&state=jump&notification _id=$1 [NC,L]

    # Pagination for /items/ - /items is still handled by the catch-all, etc.
    RewriteRule ^items/([0-9]+) index.php?page_slug=items&page=$1 [NC,L]
    RewriteRule ^news/([0-9]+) index.php?page_slug=news&page=$1 [NC,L]
    RewriteRule ^crafting/([0-9]+) index.php?page_slug=crafting&page=$1 [NC,L]

    # Messages - first pagination. Then we have two URLs mapped to our write-new
    # slug - /write-new-message/ and /write-message-reply/. -new accepts a user ID,
    # and -reply takes a message ID. Slick.
    RewriteRule ^messages/([0-9]+) index.php?page_slug=messages&page=$1 [NC,L]
    RewriteRule ^write-new-message(/([0-9]+))? index.php?page_slug=write-message&to_user_id=$2 [NC,L]
    RewriteRule ^write-message-reply(/([0-9]+))?(/(all))? index.php?page_slug=write-message&reply_to_id=$2&reply_to_all=$4 [NC,L]
    RewriteRule ^message/([0-9]+) index.php?page_slug=message&message_id=$1 [NC,L]

    # The boards need to support both a 'nice' URL (/thread/1) AND a page number
    # on that URL (/thread/1/2/).
    RewriteRule ^threads/([0-9]+)(/([0-9]+))? index.php?page_slug=threads&board_id=$1&page=$3 [NC,L]
    RewriteRule ^thread/([0-9]+)(/([0-9]+))? index.php?page_slug=thread&thread_id=$1&page=$3 [NC,L]
    RewriteRule ^edit-post/([0-9]+)(/([0-9]+))? index.php?page_slug=edit-post&post_id=$1&page=$3 [NC,L]
    RewriteRule ^edit-thread/([0-9]+)(/([0-9]+))? index.php?page_slug=edit-thread&thread_id=$1&page=$3 [NC,L]

    # Search page rules.
    RewriteRule ^search/([a-z0-9]+)(((/([^/]+))(/(exact|contains)?)(/([0-9])+)?))? index.php?page_slug=search&state=search&search=$1& term=$5&page=$9&precision=$7 [NC,L]

    # Craft things.
    RewriteRule ^craft/([0-9]+) index.php?page_slug=craft&id=$1 [NC,L]

    # Gotta catch 'em all! Don't put any rules below this one.
    RewriteRule ^([A-Z0-9-]+)(/(.*))?$ index.php?page_slug=$1 [QSA,NC,L]


    Apache directives:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !\.(js|css|gif|jpg|png|ico)$ [NC]
    RewriteRule ^(.*)$ index.php [QSA,L]
    RewriteRule ^get/([0-9]+).gif$ /click/siggy/$1 [L]
    # # avhp5-engine
    AddHandler av-php56 .php
    php_flag display_errors off

    # # av:Toolbar
    SetEnv AV_TOOLBAR 0
    Last edited by reim; 02-14-2021 at 10:59 PM.

  2. #2
    alemoppo is offline AlterVista Staff
    Join Date
    Feb 2010
    Location
    IT
    Posts
    678

    Default

    Did you check the readme file?

    when my .htacess file doesn't have RewriteBase /
    You have to use that code, so there are probably other errors. Can you revert the .htaccess code please?

    Bye!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO