Rewite module (.htaccess not working)
Found the solution,
First of all login to your server, run these commands:
sudo a2enmod rewrite
sudo systemctl restart apache2
Open /etc/apache2/sites-enabled/000-default.conf file by the below command. If you already installed ssl on your server via Let's Encrypt, run the second line command.
sudo nano /etc/apache2/sites-enabled/000-default.conf
sudo nano /etc/apache2/sites-enabled/000-default-le-ssl.conf
Paste below lines after <VirtualHost *:80> and before </VirtualHost>:
<Directory /var/www/html>
AllowOverride All
</Directory>
Now restart apache server:
sudo service apache2 restart
Now I am sure that .htaccess file will work 100%.
Hint: if you can, disable AllowOverride and add rewrite rules to vhost config in directory section you can gain some performace boost because if AllowOverride is on, then Apache2 search in every directory within DocumentRoot for htaccess in every request.