Edit .htaccess file

Is it possible to edit the .htaccess file on free hosting (or paid hosting)? I want to insert some rewrite rules to remove the .php extension in the URL. So that xxx.xx/login.php will be xxx.xx/login

Also when I open my website at the index page there will be a query parameter in the url like xxx.xx/?i=1

It doesn’t happen all the time but how do I remove the query parameter from the url?

Yes, of course you can use .htaccess rules! Just create a file called .htaccess in your htdocs folder and you can use your .htaccess rules!