How to Enable mod_rewrite at Server

mod_rewrite may not be enabled by default in your Apache configuration. To make sure,
open the Apache configuration file, named httpd.conf.
The full path of the file will be \Program Files\xampp\apache\conf\httpd.conf.

Open httpd.conf and find the following line:
#LoadModule rewrite_module modules/mod_rewrite.so
The leading #means the line is commented, so remove it in order to have Apache load the mod_rewrite
module upon its startup:

LoadModule rewrite_module modules/mod_rewrite.so

After any change to httpd.conf, you need to restart the Apache server in order for the changes to take
effect. In case you run into trouble, you can check Apache’s error log file /logs/error.log, which
should contain the details of the error.

Once mod_rewrite is installed and enabled, you add the rewriting rules to the Apache configuration
file, httpd.conf. Apache also lets you save configuration options (including rewriting rules) on a
per-directory basis to a configuration file named .htaccess. All you have to do is create a file named
.htaccessinto a directory of your application.