WordPress的htaccess /永久链接问题

I'm facing an issue with Permalink for Wordpress site that I have hosted on ubuntu server. Whenever I save the permalink setting I receive an error to modify .htaccess file and update the setting as provided below,

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

I did this activity but the links are not working I'm receiving 404 error. Before updating this file link the url's used to work with index.php/ This .htaccess file is placed in the folder where I have installed the folder.

Any input in this regard will be appreciable. Thanks in advance.

If this .htaccess file is in the /wordpress directory, then move it to the above directory, and it should work.