PHP how to create htacces file in windows pc localhost

In this video I have shown how you can create htaccess file in windows pc.
I have demonstrated that with a small project created in xampp server.
So the file is created in htdocs folder in the installation directory.

1. First open the notpad app from windows

2. Now navigate to the location where you want to save the file. Give the filename as ‘.htaccess’ and Save as type as All Files as shown below.

Thats all, You have successfully created the htaccess file.

3. The Rewrite rule I have shown in the video is shown below.

After writing the above rule in htaccess file, You can have custom URL for your pages in the project.

7 views