.htaccess rewrite rule not working on cpanel
<p>I have created a website on my localhost,
Inside htdocs I have added a folder 'sitename' this contains all files including .htaccess. This is working fine on my local, but when I am uploading it on server the its not working.</p>

<p>.htaccess code</p>

<pre><code>Options +FollowSymlinks
RewriteEngine on

RewriteBase /sitename/

# redirect to .php-less link if requested directly
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
#RewriteRule ^ /sitename/%1 [R,L,NC]

ErrorDocument 404 /sitename/404

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/sitename/$1.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
</code></pre>

<p>What should be the replacement for 'sitename' while uploading on cpanel
public_html??</p>