. Htaccess is a configuration file on the apache server, but it is in the default state. htaccess is not supported. We need to make some simple configuration before it can be used in the apache server. htaccess file.
Open the httpd. conf file and use a text editor to find
The Code is as follows: |
Copy code |
Options FollowSymLinks AllowOverride None Changed:
Options FollowSymLinks
AllowOverride All |
Search in the httpd. conf file
LoadModule rewrite_module modules/mod_rewrite.so. If there is a # symbol in front of it, remove it. Save and restart Apache.
If you create. htaccess in a windows system, you cannot create it directly. Here is a solution.
Start-run-type cmd to open the cmd window
In this case, the cmd window path is C: Documents and Settingsusername>
Enter the following (excluding the information in parentheses ):
Copy con. htaccess (Press ENTER)
(Press Ctrl + Z to press Enter)
The screen prompt is as follows:
C: Documents and Settingsadmin> copy con. htaccess
^ Z
1 file has been copied.
Return to the desktop and double-click my computer to enter C: Documents and Settingsusername
You can see the file ". htaccess" you want"