By default mod_rewrite mode is not enabled on localhost , We need to edit the httpd.conf file
Steps to enable :
1) left click wampmanager -> Apache -> httpd.conf .It will open file in notepad
2) Find the line #LoadModule rewrite_module modules/mod_rewrite.so
3) Remove the comment symbol ‘#’ to activate the module. Then save the file .
4) Restart Apache to activate this change.
Happy Coding:)