how Installing mod_rewrite localhost

If you’ve installed Apache yourself, read on. Because of its
 popularity, mod_rewrite is now included with all common
 Apache distributions. If desired, you can verify if your Apache installation has the
mod_rewrite module by looking for a file named
mod_rewrite.sounder the modulesfolder in your
Apache installation directory.

However, mod_rewrite may not be enabled by default
 in your Apache configuration. To make sure,open the
Apache configuration file, named httpd.conf. If you’ve
 installed Apache using the XAMPP
the full path of the file will be
\Program Files\xampp\apache\conf\httpd.conf.
Open httpd.confand 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, and Apache will read it
automatically when accessing that directory.