I would like to have permalinks of the form http://localhost/mysite/sample-post/
. I tried to achieve this by changing the permalink settings in the admin panel to 'Post name' from default. But this causes 404: page not found error.
I've tried with the other settings e.g., month and name, numeric etc. but all of them results in 404. The generated URL is changing according to the permalink setting though.
Clearing the cache did not help either.
Does something else need doing here ? Thanks.
Edit:
My server: lamp on ubuntu 12.4 lts
Contents of the .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/index.php [L]
</IfModule>
# END WordPress
.htaccess
file?