+ Reply to Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: 500 Internal Server Error

  1. #11
    I found two htaccess files in the public html. Cant seem to upload files to the forum, says invalid file.

  2. #12
    Master
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    403
    There should be only one .htaccess file in the public_html folder. It is likely that the problem is that there are two in it.

  3. #13
    Do both files have the same name and extensions?

    Sometimes, the second one has a different name or extension, so as not to overwrite the original file on the server.

  4. #14
    Thank you for the assistance with this issue.
    Im realy a boat without a paddle when it comes to these problems :o)

    I can only see the files when I enable show hidden files.
    One is called "htaccess" and one "htaccess.admin_edit_htaccess_too_big.16253864 91"

  5. #15
    # Configures the footer on server-generated documents
    ServerSignature Off

    # enable apache morRewrite module
    RewriteEngine on

    # The URL prefix to be used for per-directory
    RewriteBase /

    # Block BAD user agents
    # Note: The final RewriteCond must NOT use the [OR] flag.

    # Return 403 Forbidden error.
    RewriteRule .* index.php [F]

    # The following rules are for bandwidth-hogging download tools

    # This line denies access to all of the above tools
    </IfModule>

    # Block possible mySQL injections
    RewriteCond %{REQUEST_METHOD} ^(PUT|CONNECT|HEAD|TRACE|TRACK) [NC,OR]
    RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
    RewriteCond %{HTTP_COOKIE} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC,OR]
    RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999} [NC,OR]
    RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|updat e|md5|benchmark) [NC,OR]
    RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
    RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%3C|%3E|%00) [NC]
    # Note: The final RewriteCond must NOT use the [OR] flag.

    # Return 403 Forbidden error.
    RewriteRule .* index.php [F]

    # set files headers
    <IfModule mod_headers.c>
    <FilesMatch "\.(png|gif|jpg|jpeg|woff)$">
    Header set Cache-Control "max-age=5356800, public, must-revalidate"
    </FilesMatch>

    <FilesMatch "\.(css|js)$">
    Header set Cache-Control "max-age=2678400, public, must-revalidate"
    </FilesMatch>
    <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
    </FilesMatch>
    Header append Connection keep-alive
    <FilesMatch ".(eot|ttf|otf|woff|tmpl|js|css|jpg|png|svg|gi f)">
    Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
    </IfModule>

    # deflate static content
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/x-component text/css application/x-javascript application/javascript
    </IfModule>

    # http://httpd.apache.org/docs/2.2/mod/mod_expires.html
    <ifmodule mod_expires.c>
    <filesmatch ".(css|js|png|gif|jpg|jpeg|htc)$">
    ExpiresActive on
    ExpiresDefault "access plus 1 year"
    </filesmatch>
    </ifmodule>

    # allow request methods
    <Limit POST PUT DELETE GET OPTIONS HEAD>
    Order deny,allow
    </Limit>

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} ^/templates

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f

    ErrorDocument 404 /404.html


    #RewriteCond %{REQUEST_URI} !(\.[a-z]+)$ [NC]

    #RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/]|\?.+)$ [NC]
    RewriteCond %{REQUEST_URI} !(\.[a-z]+|[\/])$ [NC]

    # define system languages
    #RewriteRule ^([a-zA-Z]{2})$ index.php?page=$1 [QSA,L]

    # define paging
    RewriteRule ^([^//]+)/?(.*)?/index([0-9]*).html$ index.php?page=$1&rlVareables=$2&pg=$3 [QSA,L]

    # define listing
    #RewriteRule ^(([\w\-\_]+)?/)([^/]+)(/.+)-l?([0-9]+).html$ index.php?page=$2&rlVareables=$3$4&listing_id=$5 [QSA,L]
    RewriteRule ^([^/]+)(/?(.{2,}))?-l?([0-9]+).html$ index.php?page=$1&rlVareables=$3&listing_id=$4 [QSA,L]

    # wildcard request
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d [OR]
    RewriteCond %{REQUEST_URI} ^\/
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    #RewriteCond %{HTTP_HOST} \.{2,} [NC] # 1 is localhost usage, 2 is global usage
    RewriteCond %{HTTP_HOST} ^([^\.]+)\..+\.+ [NC]
    RewriteCond %{HTTP_HOST} ^([^\.]+) [NC]
    RewriteRule (.*) index.php?page=%1&wildcard&rlVareables=$1 [QSA,L]

    # account request (sub-directory)
    RewriteRule ^((\w{2})/)?([\w-_]{3,})$ index.php?page=$3&lang=$2&account_request [QSA,L]

    # define single pages
    RewriteRule ^([^//]+)/?(^/*)?.html$ index.php?page=$1 [QSA,L]

    # define other pages
    RewriteRule ^([^//]+)/?(.*)?/?(.*)?(.html|/+)$ index.php?page=$1&rlVareables=$2 [QSA,L]

  6. #16
    Master
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    403
    line 19 is the error. </IfModule> it doesn't have to be there. Try it without it.

  7. #17
    This is the error now on the page after I deleted line 19

    Forbidden
    You don't have permission to access this resource.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    Last edited by Eydalvur Carlsson; July 10, 2021 at 01:37 PM.

  8. #18
    Master
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    403
    Which version of flynax are you using? The original .htaccess file should be uploaded, because what I put in here is pretty incomplete.

  9. #19
    4.8.0, this issue just happend. There have been no changes or editing made to the site.
    Last edited by Eydalvur Carlsson; July 10, 2021 at 01:47 PM.

  10. #20
    Master
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    403
    Then upload the .htaccess file released for version 4.8.2, because what you have now is not the same as the original.

+ Reply to Thread