hi i asked this question but
i still tried to solve it and it is solved.
I uninstalled Apache server and installed it again
and while setting again I realized
i wasted my time by uninstalling everything and installing it back
i had this in my httpd.conf file of Apache server
" AllowOverride None"
which was supposed to be
AllowOverride All
Stupid me
which bypassed my .htaccess file in directories
now it works fine
