How to fix .htaccess not working in XAMPP

There are many advantages of XAMPP that can turn a computer into a local server that can be used to work on a script related to programming. With the help of XAMPP, users can start working on PHP scripts that can be run offline and do not require a connection if the script does not authenticate to other websites, e.g. B. when logging in or accessing content from external websites. All programmers definitely need this to make it easier to work on the offline script editing on their own server, as they are not afraid of mistakes and can also be used for learning.
In addition to PHP, XAMPP can also be executed MySQL, FileZilla, Mercury and TomCat. And the user can manage all the necessary configurations. So, if users used to make website edits from hosting via a file manager or FTP that could not always be correct, now they can do so easily with the help of XAMPP and don’t have to worry about wrong or missing code because no one but sees the connected local network. Users can start by changing the configuration settings of the ROOT layout, or it can be called htdocs and simply use the localhost url or IP address 127.0.0.1 to visit.
The interesting thing about this tool is that XAMPP works in the background and never slows down the device due to the many tasks that are activated. So users don’t have to hesitate if they want to try a low / good spec computer. There are things that prevent this XAMPP from working properly, namely it cannot read .htaccess files and has to be activated manually. If the user has some kind of blog engine installed on XAMPP like WordPress it might need a .htaccess file in it and it can do many things including changing the url to make it more manageable.
In this article I will share How to activate .htaccess so that it can be used properly because if the .htaccess doesn’t work it will show a 404 page making it look like you are visiting the wrong page. Although .htaccess is mainly used by urls and files, it is very important when used to make a site better and more elegant. Because without this .htaccess, users cannot create URLs cleanly without having to create folders in the directory. How to fix the problem, see below.
First open XAMPP and go to the ROOT directory (htdocs). Make sure the .htaccess file already exists and if it doesn’t exist please create it first.
Next, please go to the directory in which XAMPP was installed and go to the folder / apache / conf / and look for a file called httpd.conf please edit with notepad.
Please locate (CTRL + F) the file with text that says: AllowOverride None and please change to AllowOverride All.
Still not done, please search again LoadModule rewrite_module modules / mod_rewrite.so and unmark # to the left of the text. Then save the file and run Apache again under XAMPP.
It’s easy, isn’t it? Typically, users forget not to create a .htaccess file as most PCs have the option of creating files directly with an unnamed extension. So I recommend users to check first whether the .htaccess file already exists or not. And in the section Remove the hash sign (#) for the LoadModule text above so that it can be read, because the hash sign means that comments are hidden or just used. Sometimes you don’t need to remove the hash mark from LoadModule Rewrite, you can, but some devices will tell you to. And an important thing to be able to activate .htaccess is Change AllowOverride none to AllowOverride All. If you have any questions about any of the above, please comment.
Hopefully useful and good luck