title: 404 not found , the requested URL <<url name>> not found on this server in wordpress
body: <p>I recently installed wordpress , I am facing issues when I try to change the  permalinks format , </p>
  
  <p>when I change the permalink from default to day and time </p>
  
  <pre><code> Default    http://127.0.0.1/?p=123
   Day and name   http://127.0.0.1/2015/03/16/sample-post/ 
  </code></pre>
  
  <p>the link generated does't working , it gives the same <code>error 404</code> all the 
  time ,</p>
  
  <pre><code> The requested URL /2015/03/16/post-5-problem/ was not found on this server.
  </code></pre>
  
  <p>But when the permalink type was default this works perfectly.</p>
  
  <p>I found some solutions which are </p>
  
  <pre><code>sudo a2enmod rewrite
  
  Module rewrite already enabled
  </code></pre>
  
  <p>Another solution is to <strong>change the mode permissions of .htaccess file to 666(giving write permission to wordpress of .htaccess file) before change the permalink from default to some other type ,</strong></p>
  
  <pre><code>sudo chmod 666 /address_of_.htaccess 
  </code></pre>
  
  <p>i checked the .htaccess file </p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>but the above seems to be correct , the above included by the wordpress itself </p>
  
  <p>Both the solutions does't seem to work , is there any other thing do I have to change to enable the permalink options ?</p>