I dont can put my .htaccess on htdocs file

hey i have get a free hosting from infinity i have uplodet my php script but only my .htaccess can i not put in htdocs file . please help me

Hi,

The max upload file size for .htaccess files is 10 KB.
If your file is above that limit, you will have to remove some content.

2 Likes

o my file size is 13Kb
you can’t exceptionally do the 14 kb please
when i remove some content there can be problems

1 Like

Sorry, I can’t do a thing. I’m just a free customer like you.
But I can tell you, from experience, that there are no exceptions to these limits and nobody will raise them for you.

There has got to be some rules there that you can delete.
Check it carefully because there is no other way for you to be able to host that file here.
Good luck.

6 Likes

I’m pretty sure you can use FileZilla to upload the .htaccess file.

1 Like

i have uplodet it with filezilla but dont work

What was the problem? It should work.

I don’t know why your .htaccess would be more than 10kb? It’s usually less than 10kb.

Either way, the file should be able to be uploaded using filezilla, right?

Yes, it should be able to be uploaded since I have uploaded files that are 40Mb+

Same here… @sonfetih, What was the error when you tried to upload the file, give us the error details in the log box.

EDIT: OOOOOHHHHH, I remember, your issue might be related to the ongoing server issues because Admin told us that there were FTP issues too…

No. You can upload it but it will be deleted on arrival.

No, you didn’t.
You may have uploaded them, but they were deleted right after the upload.

This has nothing to do with that. He uploaded everything except the .htaccess file. He had no problems using the FTP.

Here you go. The three of you should read this:

5 Likes

Whoops…

They never got deleted they are still there.

Yea, My files I uploaded are bigger than the file limit and they are still there…

2 Likes

Can you show a screenshot of that please?
Thanks.

Like @alexvf said, a .htaccess file cannot be larger than 10 kB. Files larger than that are automatically removed.

.htaccess files that are so large usually contain rules that should not be done through .htaccess rules in the first place.

We have a section here that describes some common use cases for huge .htaccess files and some ways to improve them:

2 Likes

Dumb me! I thought he meant ALL file types!! :joy:

@sonfetih, I guess you found your answer:

You need to remove something in that .htaccess file otherwise its not gonna work.

One thing you can do if you have subdirectories is to put .htaccess files in those subdirectories with the rules that apply to them.

Example, your main .htaccess contains rules about example.com/somesubdirectory/. Instead, you can go to that folder (somesubdirectory) and put a .htaccess file there that contains rules for that subfolder.

Note that you cannot have more than 1 htaccess file per directory.

4 Likes

Try opening the htaccess with a notepad then copy all of the file then paste it in a new file in the file manager.