URL rewrite not working
I solved the problem and am writing it down for future people encountering the same problem.

Add the following configuration to the your craft/config/general.php config file:

'omitScriptNameInUrls' =&gt; true


URLs will start to work fine.