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

Permission denied: /home/username/ htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

When checking your error log you find the error 508 or 403 forbidden error in your browser and...

What are all these htaccess files?

Understanding .htaccess Files on Your Hosting Account   If you look through your hosting...

Disable error_log via htaccess

Disabling error_log Files via .htaccess   If your error_log file is growing large and...

htaccess referral redirect

Setting Up a Referral Redirect With .htaccess   A referral redirect (also called a...

What are these htaccess files that keep popping up?

Why .htaccess Files Keep Appearing in My Directories   If you notice .htaccess files...



Save 30% on web hosting - Use coupon code Hosting30