My htaccess disappeared

I was making some changes to htaccess and after I saved the content it disappeared and my website returned a 404 error

https://nasatechtechdrive.rf.gd

How big is the file? I suspect is due to this

No issue

9 Likes

Thank you very much, I don’t know what happened after I added security rules to htacess it disappeared and after I tried to rebuild it without success, thank you very much, this gives me relief

Hmm I understand, I think that because of this code it disappeared in the ftp too:

<files .htaccess>
  order allow,deny
  deny from all
</files>

unfortunately some plugins did not identify

I was performing some security configurations on htacess until I lost access and I believe I know the code that generated this problem, my website works smoothly but the plugins cannot identify the file and I cannot edit it in Monsta Ftp on account that he is hidden

https://nasatechtechdrive.rf.gd

I Think is this code:

<files .htaccess>
order allow,deny
deny from all

Please do not create multiple topics. You have this one right here.

You lost access as in you can’t open the file to edit it?

That has a few syntax errors but I don’t think that’s what’s causing your issue. Also, you don’t need that rule in your htaccess. Users can’t open the file on their browsers.

8 Likes

I’m Sorry

No, I can’t even see this file, it is hidden in monsta ftp

It must have been that your .htaccess file went over the limit. Can you create another .htaccess in your htdocs folder?

3 Likes

I can, but unfortunately I don’t think I will be able to put all the necessary codes, I have a backup saved in the same directory, but I don’t think it will help me much

How big is the backup? You can remove unnecessary whitespace from the file to reduce the size of it. It’s not a drastic amount, but maybe it will help.

7 Likes

I have an exclusive htaccess backup, it is 7 kb
It’s the same backup I ended up having, it has some cache rules but I believe that not all plugins will work again with this change, I’ll see if restoring each of these plugins can help

Is the old htacess deleted?

If you don’t have a backup and it’s not on the server, yes, and it can’t be recovered.

9 Likes

Thank you all very much, this gives me relief

And I’m sorry for any inconvenience I ended up causing

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