500 Internal Server error

Hi there.
I’m using the free plan and I have uploaded a social media website but I get 500 Internal server error. this website needs some htaccess codes so I tried to edit the root htaccess file but it didn’t work then I deleted every file except mine. It didn’t work too. If you can configure it that would to be awesome. my htaccess code is:

#SetEnv APPLICATION_ENV development

DirectoryIndex /public/index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+) $1 [L]
RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
RewriteRule ^(.+) /public/$1 [L]

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /public/index.php?q=$1 [L,QSA]

#RewriteRule !\.(js|ico|gif|jpg|png|css|xml|xslt)$ /public/index.php

Please help me. I’m going to credit you in the the about page of my website.
Thanks in Advance

Well, it’s not possible to change the .htaccess in the root folder unfortunately. If you want to set any custom rules, you can do so by editing the .htaccess file in the htdocs folder of your account.

If you get a 500 - Internal Server Error after setting these rules, it means that you set the rules in the correct file but the rules themselves are invalid or not supported. You can try to comment all lines one by one and see at which point the 500 error disappears. However, I suspect the SetEnv line is the culprit here.