Home » .htaccess » What is .htaccess file and What Can I Do With It?

What is .htaccess file and What Can I Do With It?

What is .htaccess?

The .htaccess is a configuration file for use on web servers managing the Apache. Once the .htaccess file is stored in a directory which is run by the Apache Web Server. The .htaccess file describes how a web server responds to the various request. It is supported by several web servers, including most of the commercial web hosting providers using Apache software.

Where is the .htaccess file?

Every server in the web root folder, your server could have one .htaccess file. The public_html folder only holds all the content of your website. In case you do not have a .htaccess file in public_html may be the file is hidden in your root directory or else you need to create new on as .htaccess and in a subdirectory you need to maintain the separate .htaccess file.

Why can’t I find .htaccess file?

Most of the hosting providers that file names begin with a dot(.) are hidden files, This is for security reason the file is hidden by hosting providers but here you have the option in the setting to show begin with a dot(.) files. If you can’t able to see the .htaccess file here an article.

What is an error code?

When a request is made to a web server but the response not returned at the time the error code will works. If something goes wrong with the webpage or server an error is generated. Here they are various types of errors and have different error codes. May you know about 404 error, which is returned when document not found in the server.

Below here you can see the type of error codes that a server can respond with.

Client Request Errors

400 — Bad Request

401 — Authorization Required

402 — Payment Required (not used yet)

403 — Forbidden

404 — Not Found

405 — Method Not Allowed

406 — Not Acceptable (encoding)

407 — Proxy Authentication Required

408 — Request Timed Out

409 — Conflicting Request

410 — Gone

411 — Content-Length Required

412 — Precondition Failed

413 — Request Entity Too Long

414 — Request URI Too Long

415 — Unsupported Media Type.

Server Errors

500 — Internal Server Error

501 — Not Implemented

502 — Bad Gateway

503 — Service Unavailable

504 — Gateway Timeout

505 — HTTP Version Not Supported.

Below here some of the .htaccess articles.

1. How to view hidden files (.htaccess) in cPanel File Manager
2. How To Use .htaccess To Force SSL On Your Website
3. Redirect HTTP to HTTPS Using .htaccess
4. How to Redirect non-www to www URLs
5. How to redirect www URLs to non-www
6. How to Redirect from HTTPS to HTTP
7. How to Enable GZIP Compression
8. Protect Files and Directories using .htaccess
9. How to Remove File Extension .php, .html from URL using .htaccess
10. How to Fix the Leverage Browser Caching Using .htaccess
11. Cross-origin resource sharing (CORS)

Was this article helpful?

Yes No

How can we improve it?


We appreciate your helpul feedback!

Your answer will be used to improve our content. The more feedback you give us, the better our pages can be.

Follow us on social media:

Facebook Pinterest


Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top