Wordpress Showing Error In Sub-Directory

I recently installed my wordpress in sub-directory

ex - www.sitename.com/wordpress

but its showing me error when I open.

I found out this code in my .htaccess file in public_html directory of my domain

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1[R=301,L]

when I remove this then the wordpress works just fine.

Please help its urgent.

You need to set it up as a sub-domain instead so that they do not conflict with each other.

You need to set it up as a sub-domain instead so that they do not conflict with each other.

I would have done that long back if I wanted to. But the whole point to put it in sub directory was for the better seo