I have a doubt with my codeigniter .htaccess file. I was hoping there was something I was missing.
My question is I need a different .htaccess file for my live server and one for localhost. Locally, I'm using macos and linux, on my live server I am using centos with plesk(not sure if that matters).
The issue is I need a different htaccess file for the different environments. This seems stupid! As eventually I want to release my code so the end user doesn't have to manually edit the .htaccess files to get rid off the index.php in the url!
I must be doing something wrong as surely it must be standard here is what works on my local home server.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
and below is my live production server
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
What gives?