Htaccess file is an Apache web server configuration file that can be used to override some Apache settings for an entire site or a specific folder.
If you try to create an .htaccess file in Windows operating systems , the result will be a “File name must be entered” error.
Error creating a .htaccess file on windows.
To work around this error, you need to create an empty text document and then rename it to .htaccess. (with a dot at the end). After renaming, the extra period will disappear.
If you are using a dedicated text editor, you can most likely create your .htaccess file through it. Instructions for Notepad ++ users:
Some of the most popular directives are site encoding and error control settings. Let’s specify them in the .htaccess file:
# Charset AddDefaultCharset UTF-8 # Errors php_value error_reporting -1 php_flag display_startup_errors on php_flag display_errors on
In this example, we have specified the following directives:
Now the .htaccess file can be placed in the root folder with the site.