Remove index.php from url

Had trouble getting this to work
I removed index.php string out of config.php
put . in front of htaccess file in root folder
but it did not work but I found this and it works

## Run InvoicePlane in a subfolder
## If you are using a subfolder please remove the hash in front of the line ‘#RewriteBase /subfolder’
## and replace ‘subfolder’ with the actual name of your folder, i.e. ‘RewriteBase /invoices’

<IfModule mod_rewrite.c>

  RewriteEngine On
  #RewriteBase /subfolder
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
   #RewriteRule . /index.php [L]
  RewriteRule .*  index.php/$0 [PT,L]
  
  ## Remove the hash in front of the following two lines if you want to force HTTPS
  #RewriteCond %{HTTPS} off
  #RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
  
  Redirect /setup http://localhost/
  
</IfModule>

Why did you altered the line #RewriteRule . /index.php [L]?
And are you sure that mod_rewrite is enabled On your server?

That rewrite never worked I don’t no why i’m running latest mamp server.

rule below works so rewrite engine must be working

i was watching this video and thats the rule he used so I gave it a shot. I’ll find out why later when I’m not busy customizing

https://www.youtube.com/watch?v=ck5pTkRumPw

I had the same problem and your solution worked. Thanks.