what is the default .htaccess codes?

Can you please send the default codes for .htaccess file

@Vasulho said:
Can you please send the default codes for .htaccess file

It depends on what platform you want to use

DirectoryIndex index.php index.html index2.html

ErrorDocument 400 https://infinityfree.net/errors/400
ErrorDocument 401 https://infinityfree.net/errors/401
ErrorDocument 403 https://infinityfree.net/errors/403
ErrorDocument 404 Suspected phishing site | Cloudflare
ErrorDocument 500 https://infinityfree.net/errors/500
ErrorDocument 503 https://infinityfree.net/errors/503

Do you want this?

i created a .htaccess file and it’s working well except that it doesn’t disable directory listing even though i’ve added the code Options -Indexes. It shows “Forbidden
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.” on my site.
what will be the reason?

@Vasulho said:
i created a .htaccess file and it’s working well except that it doesn’t disable directory listing even though i’ve added the code Options -Indexes. It shows “Forbidden
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.” on my site.
what will be the reason?

That’s exactly what disabling directory listing does. Instead of listing the directory, it shows a forbidden error. What did you expect would happen?

how do i fix this?

@Vasulho said:
how do i fix this?

Nothing is broken from a server perspective, so there isn’t anything you can “fix”. What do you want to show?