.htaccess file deleted itself and I can’t create a new one =(
I have no idea how this happened, I had just changed my error pages to https instead of http in the file (which did break error pages for some weird reason but now it’s working as https after i entered them again into the “Error Pages” section on the cPanel.)
I tried creating new files in the “file manager” and I also tried connecting via FTP and replacing the file but that didn’t work either. It just so happens I JUST took a full backup of my site so I do have the .htaccess file, I just can’t figure out how to get it back on there.
If anyone has a solution please let me know this has happened one other time, a long time ago I was editing my main index.html and I closed it and then it was gone. I had to re-do a ton of work! Just like this situation and it drove me crazy but I assume this might be different? Idk, any help would be great bc I’m just not sure what to do/think.
Lol absolutely not, it’s a text file with like less than 15 short lines of text if that even. I say lol bc I’m imagining how much stuff you’d have to have in an .htaccess file to get to 10KB.
Also… I swear it told me the file limit is 128MB yesterday when I tried to upload a big file, is it really only 10MB? This would make sense because it never lets me upload big files yet acts like it successfully does. They “successfully” upload and then there’s nothing there. So damn annoying!
But no, I think the issue is that it won’t let you upload any files to that main directory where it has the file that says “DO NOT UPLOAD FILES HERE” xD and that of course is where the .htaccess file goes. I have no idea how or why it deleted itself. The weird part is I swear I’ve put files there in the past, i maybe even made the original .htaccess file, there’s another file in there I think I did make.
How do I go about fixing this? I can’t upload the file myself and I cant create new files there. I need it though obviously, I have an important function in that file. I’m confused because I’ve edited it so many times in the past and nothing like this has ever happened =/
Please never upload or replace files in the root directory. It can cause issues with your hosting account. All files of your website must be in the corresponding htdocs folder, including the .htaccess file, as @EuropeanRat said.
I guess there was a glitch that let your files stay there, but just because you can, it doesn’t mean you always should, as it says “DO NOT UPLOAD FILES HERE” in that directory.
Were you looking at the upload limit of the file manager? Because that limit is higher than the file size limit for individual files. That way, you can (at least in theory) upload a big zip file, and have the file manager extract and upload the smaller files within it.
The file manager doesn’t display a size limit for individual files, it doesn’t have such an option.
It depends. What’s actually broken? How is your website malfunctioning right now because of this?
There was a .htaccess file there, and now there’s not. If your website is completely unaffected by that, then what is there to fix?
Yes, file manager. It’s very inconsistent though and usually won’t upload (or transfer via FTP) big files not even near 128MB. It doesn’t even error or say failed, it just acts like it uploaded yet hasn’t.
I fixed it, I added it back to the htdocs directory and all seems well now. I do have an important function in there that helps something not be broken, I don’t remember exactly what it does now bc it was a long time ago but I do know it’s important. I don’t know why it was originally in the main root directory but it was and there is still .htpasswd, .lastlogin, .override files there as well. I am almost 100% positive they were generated there by the hosting, not me. So I wasn’t even the one that put it there originally, I thought that’s where these files go because that’s where they’ve always been. I see now that it works the same when placed in htdocs. Thanks for the reply.
The 128MB limit is the limit that MonstaFTP is set to be able to upload, but the server has a limit that no files can be bigger than 10MB. So files bigger than that are automatically deleted right after being uploaded.
This makes sense, extremely annoying but that’s what seems to happen. Thanks for the clarification.
I want to upgrade to paid hosting with infinityfree to avoid stuff like this but I’m honestly worried there will be a bunch of weird things like that with the paid version too. It’s a nightmare to do a bunch of normal things like changing SSL, adding valid CNAME records, uploading big files. There are so many random issues/quirks (like appending ?i=1 to the end of URLs for some reason) and I worry the paid one would be similar. Would I be correct in assuming so? (if you know)
I really, really love infinityfree because it’s allowed me to have a website for a few years now but it’s a love/hate relationship xD
Can’t deny that this is an amazing service being provided though, even with the annoyances. Very thankful to have hosting at all. I do not want to move on from Infinityfree but I worry someday I will maybe have to. I have been thinking about at least trying the paid hosting though because it would suck to switch to something else and I really don’t want to. Just was wondering if you have experience with it at all? I’m curious how it compares.
You would be incorrect in assuming so. We say very clearly on our home page: free hosting is not a demo for premium hosting. If you want to know if premium hosting is a good fit for you, then you should try premium hosting.
Just don’t use free hosting, complain that it comes with free hosting limitations, and ignore the premium hosting because you don’t like the free hosting.