I have some problem. In development I'm using php 7 and my website work well. But in production it using php 5.4 and I have problem in removing index.php. My website hosted in subfolder just like myhost/mywebsitefolder
.
The problem is when using url function. example, when I accesing 'dashboard' page it will redirect to 'login' page and the url is like myhost/mywebsitefolder/login
and it return 404 page not found. When I add index.php before login (myhost/mywebsitefolder/index.php/login
) it work well but I must replace all of my url by adding index.php. Are there any solution. My .htaccess is just like this.
RewriteEngine on
RewriteBase /mywebsitefolder/
RewriteCond $1 !^(index.php|resources|gallery|json|slider|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]