Alert: Please view the latest updated tutorial here: Panel Tutorials

A .htaccess file allows you to control the behavior of the Apache web server through safe and simple customizations.

With a .htaccess file, you can use common Apache modules, such as mod_rewrite.

A .htaccess file is a plain text file that sits in your app's public directory. Plain text comprises the basic characters free of distinguishing fonts, styles, or sizes; in other words, a plain text file is not a Microsoft Word document (.doc or .docx).

When you install them on your server, many apps already include a .htaccess file that you can edit to apply more rewrite rules when needed.

However, you can also create your own .htaccess file if your app doesn't include one.

Creating a .htaccess File

Because the dot (.) makes .htaccess a hidden file on most computer operating systems, the easiest way to create one is by using your SFTP client; we'll use Cyberduck in this tutorial.

First, SFTP in to your server. Open the public directory where you want the file to live and select an existing file within it.
htaccess

Then, select New File from the Cyberduck File menu.
htaccess

Name your new file .htaccess and click Create.
htaccess

Now, double click this file, and it will open with your default text editor so you can enter the code needed to customize Apache's behavior.
htaccess

Alert: For Control Panel Help & Tutorials, click here: Panel Tutorials
Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution