Summary of how to create a. htaccess file in Windows

Source: Internet
Author: User

In windows, it seems that we cannot create a file without a file name. there are other methods for creating the htaccess file. I will introduce how to create the file in Windows. htaccess file methods.


You can create multiple methods:

1. There are three methods to use the DOS command:

Use the Screen Editing Command copy con. htaccess, press enter, enter the content, and press ctrl + z to complete the editing. htaccess is successfully generated;
RENAME Command ren 1.txt. htaccess. This is the most common method. commands that cannot be executed in windows are flushed in cmd;
Use the redirection command echo.>. htaccess. Enter a carriage return to. htaccess, which can be created successfully;

2. Use winrar's file manager

First, create a new text document, then open the winrar main interface, locate the file, and rename it directly. This is what I bring when I decompress a foreign open source project. htaccess can be decompressed correctly. Of course, you can use a manager like 7zip.

3. Save the file directly using a text editing tool, such as Notepad and ultraEdit. However, you can select all files when saving the file.

4. Use the file creation method in php, fopen and file_put_contents file names can be obtained directly using. htaccess.

5. The simplest method is to find a Linux server, upload a txt file using ftp software, and rename it as. htaccess on the server. This method is the easiest.

6. Open notepad in Windows --- "file-> Save as" --- Select "all files" type from the "Save type" drop-down menu of "Save as" --- input in "file name. htaccess --- save

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.