I have deployed a server apache in ubuntu 16.04 which is devided in some virtual hosts.
I want to get rid of index.php in the url but I cant get my htaccess to work I will be deeply great-full for any help I can receive. I prefer to solve the problem in htaccess and not in apache itself because there are also other configurations I need to include in htaccess
Conf file
<VirtualHost *:80>
<Directory var/www/cartwebs.com/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ServerAdmin iosef@cartwebs.com
ServerName cartwebs.com
ServerAlias www.cartwebs.com
DocumentRoot /var/www/cartwebs.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.cartwebs.com/$1 [L,R=301]
</IfModule>