# .htaccess file problem

**URL:** <https://forum.infinityfree.com/t/htaccess-file-problem/72367>\
**Category:** Hosting Support\
**Created:** [February 16, 2023, 3:08am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367 "2023-02-16T03:08:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon68572608](https://forum.infinityfree.com/letter_avatar/anon68572608/32/6_449c533f586939b6e5f246632a46421f.png) [@anon68572608](https://forum.infinityfree.com/u/anon68572608)\
**Post date:** [February 16, 2023, 3:08am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/1 "2023-02-16T03:08:19Z")

</div>

[https://terabyte-techs.42web.io](https://terabyte-techs.42web.io)

 ![image](https://forum-cdn.infinityfree.net/original/3X/1/4/14689c3f2840383522816c9ad800bc5896111207.png)

.htaccess file disappeared from the root of said site when human error occured on my part whilst inputting blocked IP ranges(see image inline attached.

please advise and assist?

thanks, J

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [February 16, 2023, 3:12am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/2 "2023-02-16T03:12:20Z")

</div>

Likely due to this

> [@Why are my files deleted after uploading them](https://forum.infinityfree.com/t/why-are-my-files-deleted-after-uploading-them/49310/1):
>
> Sometimes, when you upload a file, the upload is completed but the file is deleted immediately afterwards. This is usually caused by one of the following issues: The file is not in a htdocs folder All websites files must be uploaded to either the main htdocs folder, or to the domain specific htdocs folder (like example.com/htdocs). You cannot upload files to other directories on your account. If you try to create or upload files anywhere else, they will be deleted automatically. The file type…

---

<div class="post-metadata">

**Author:** ![anon68572608](https://forum.infinityfree.com/letter_avatar/anon68572608/32/6_449c533f586939b6e5f246632a46421f.png) [@anon68572608](https://forum.infinityfree.com/u/anon68572608)\
**Post date:** [February 16, 2023, 3:17am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/3 "2023-02-16T03:17:50Z")

</div>

I didn’t delete it or upload elsewhere KangJL. this isn’t my first rodeo with websites or hosting svces, i’ve been doing this kind of webdav for almost 3 decades but this in fact the first time i’ve seen .htaccess seemingly vanish from the root directory whilst using the cpanel to input blocks on for example, all of North Korea, all of Libya and since i’m no friend to a specific site in question, all of Facebook in cidr format. again what gives as now i see no blocks in IP blocker cpanel but can still reach the site fine. please advise?

thanks

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [February 16, 2023, 3:23am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/4 "2023-02-16T03:23:52Z")

</div>

Did you read the article I posted?  
If not, please read.  
The answer is right there.

---

<div class="post-metadata">

**Author:** ![anon68572608](https://forum.infinityfree.com/letter_avatar/anon68572608/32/6_449c533f586939b6e5f246632a46421f.png) [@anon68572608](https://forum.infinityfree.com/u/anon68572608)\
**Post date:** [February 16, 2023, 3:30am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/5 "2023-02-16T03:30:29Z")

</div>

okay that topic still didn’t answer my question or inquiry. this is what is missing from the root

# Powered by Site.pro
 ModPagespeed off ExpiresActive On ExpiresDefault A0 ExpiresByType image/gif A691200 ExpiresByType image/png A691200 ExpiresByType image/jpeg A691200 ExpiresByType text/css A691200 ExpiresByType text/javascript A691200 ExpiresByType application/javascript A691200 Require all denied Order allow,deny ErrorDocument 401 "Unauthorized" ErrorDocument 403 "Forbidden" #Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTP:Authorization} ^(.\*) RewriteRule .\* - [e=HTTP\_AUTHORIZATION:%1] RewriteRule ^\.well-known/.+ - [L] #### PERSISTENT CONTENT #### #### PERSISTENT CONTENT END #### DirectoryIndex index.php index.cgi index.html RewriteCond %{REQUEST\_FILENAME} !-f [OR] RewriteCond %{REQUEST\_URI} ^\/(js\/(main\.js|bootstrap\.min\.js)|css\/(\d+\.css|common\.css|site\.css|bootstrap\.min\.css))$ RewriteCond %{REQUEST\_FILENAME} !-d RewriteRule ^(.\*)$ sitepro/$1 [L,QSA] #### PERSISTENT CONTENT ####

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [February 16, 2023, 3:49am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/6 "2023-02-16T03:49:00Z")

</div>

> [@anon68572608](#):
>
> that topic still didn’t answer my question or inquiry

I can see that you do not read.  
Let me quote the answer for you.

> [@Why are my files deleted after uploading them](https://forum.infinityfree.com/t/why-are-my-files-deleted-after-uploading-them/49310/1):
>
> ## The file exceeds the file size limit
> 
> The InfinityFree web servers have size limits for all files. If the file size exceeds the limit, the file is automatically deleted.
> 
> The size limits are:
> 
> - HTML and PHP files are limited 1 MB.
> - .htaccess files are limited to 10 kB.
> - All other files are limited to 10 MB.

Can you see the answer now?

---

<div class="post-metadata">

**Author:** ![anon68572608](https://forum.infinityfree.com/letter_avatar/anon68572608/32/6_449c533f586939b6e5f246632a46421f.png) [@anon68572608](https://forum.infinityfree.com/u/anon68572608)\
**Post date:** [February 16, 2023, 3:50am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/7 "2023-02-16T03:50:45Z")

</div>

I read fine, I missed the .htaccess size but thanks for clarifying it. appreciated

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [February 16, 2023, 3:53am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/8 "2023-02-16T03:53:04Z")

</div>

Welcome, I do admit that these articles can be quite lengthy sometimes…

---

<div class="post-metadata">

**Author:** ![anon68572608](https://forum.infinityfree.com/letter_avatar/anon68572608/32/6_449c533f586939b6e5f246632a46421f.png) [@anon68572608](https://forum.infinityfree.com/u/anon68572608)\
**Post date:** [February 16, 2023, 3:54am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/9 "2023-02-16T03:54:24Z")

</div>

okay so if I reload the .htaccess file with just the default content intact it should re-appear I’m going to guess??

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [February 16, 2023, 3:56am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/10 "2023-02-16T03:56:00Z")

</div>

If you do not exceed the 10kb size limit…

---

<div class="post-metadata">

**Author:** ![anon68572608](https://forum.infinityfree.com/letter_avatar/anon68572608/32/6_449c533f586939b6e5f246632a46421f.png) [@anon68572608](https://forum.infinityfree.com/u/anon68572608)\
**Post date:** [February 16, 2023, 3:59am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/11 "2023-02-16T03:59:18Z")

</div>

excellence. that worked, thanks KangJL 🖖

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [February 23, 2023, 3:59am UTC](https://forum.infinityfree.com/t/htaccess-file-problem/72367/12 "2023-02-23T03:59:34Z")

</div>

Closed on February 23, 2023, 3:59am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
