How to restore .htaccess and set up custom error pages?

Hello!

I accidentally deleted the .htaccess file on my website and am now trying to restore it. I also want to configure it so that users are redirected to my custom error pages (e.g., https://wuzzyfy.rf.gd/403, https://wuzzyfy.rf.gd/404, etc.) instead of the default InfinityFree error pages.

Could you please help me with the following:

  1. How can I properly restore the .htaccess file?

  2. How can I configure it to use custom error pages?

Thank you in advance for your help!

Unless you have a local backup, you can’t. Deleted file are deleted.

6 Likes

There is an Error Pages option in the client area you can use. It’s a bit easier to work with than writing your own .htaccess rules.

Alternatively, if you use off the shelf software, you may be able to get a fresh copy of the .htaccess file. Usually you can get it by downloading the software and grabbing the .htaccess file from it. But sometimes you can also just find it in the documentation.

4 Likes

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