You have to make changes in your htaccess code.
For example,
I have a website with the following .htaccess file:
AddType application/x-httpd-php5 .php
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$
http://www.example.com/$1 [L,R=301]
##RewriteBase /~site/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
#php values
#php_value register_globals 0
<IfModule mod_dir.c>
DirectoryIndex index.php index.htm index.html index.shtml index.cgi
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>
You can simply change 302 to 301.
Hopefully, it will help you