Welcome Guest, Not a member yet? Register   Sign In
remove index.php from view controller
#1

Hi i am new at codeigniter 4  i have installed but when i tried to access controller home with https://projects.information-ts.com/code...ublic/home i take error "No input file specified."  but when i try like this https://projects.information-ts.com/code...x.php/home it works. How can i remove the index.php from url???
I change the 
PHP Code:
public $baseURL 'https://projects.information-ts.com/codeigniter4/public'
PHP Code:
public $indexPage ''
Reply
#2

Not sure why you are getting that on a live host, but I am Running Windows 10 Pro x64
and I have to add the code below to the .htaccess in the root with index.php to get rid of it.

.htaccess

Code:
# Remove index.php on Windows 10
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ /%1 [R=301,L,QSA]

Otherwise there is something wrong with the way your .htaccess file is setup.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

i tried this not working.
On xammp its workd prefect on plesk server i have this issue
Reply
#4

Most likely need to change this line:
https://github.com/codeigniter4/CodeIgni...access#L34

Into:
Code:
RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA]
Reply
#5

(09-02-2020, 07:20 AM)jreklund Wrote: Most likely need to change this line:
https://github.com/codeigniter4/CodeIgni...access#L34

Into:
Code:
RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA]
it works thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB