When I upload an htaccess file it disappears

Why Your .htaccess File Appears to Disappear After Uploading

 

On Linux servers, any file that starts with a dot (.) is treated as a hidden file. This means your .htaccess file is there, but your FTP client or file browser may not be showing it by default.

 

How to See Hidden Files in FileZilla

In FileZilla, go to Server > Force showing hidden files from the top menu. The .htaccess file will then appear in your file listing.

 

How to See Hidden Files in cPanel File Manager

  1. Open File Manager in your cPanel control panel
  2. Click the Settings button in the upper right corner
  3. Check the box for Show Hidden Files (dotfiles)
  4. Click Save

 

You should now see your .htaccess file along with any other hidden files in your directories.

 

Creating a New .htaccess File

If you need to create a .htaccess file from scratch, the easiest method is through cPanel File Manager. Navigate to the public_html folder, click the +File button, and name it .htaccess (including the leading dot). You can then click on the file and select Edit to add your rules.

 

Note: Be careful when editing .htaccess files, as a syntax error can make your entire website return a 500 Internal Server Error. Always keep a backup of the original file before making changes.

  • 525 Users Found This Useful

Was this answer helpful?

Related Articles

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

To solve “.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable” follow...

How to create a temporary 302 redirect via htaccess

An easy way to create a temporary redirect from one page to another web page is to use the 302...

Nginx redirecting folder to another host or server

From time to time you may want to proxy out a path to another server or location. To perform a...

Show longer file names in directory/folder index

If you've ever wanted to show longer file names in your directory listing just create or edit an...

Redirecting non-www to www with htaccess

Redirecting non-www to www with .htaccessIf you ever point your www. record to another server...



Save 30% on web hosting - Use coupon code Hosting30