Welcome Guest, Not a member yet? Register   Sign In
always show index.php (error page)
#1

Noob here

I already install CI 3.1.2 in linux, with apache web server. But when i run it in web browser always direct to file index.php(show error reporting and etc) in early folder (folder project). have tried another project but display same output.

*have tried with nginx same result

where is the problem? in web server config or CI ?
Anyone can help?
Reply
#2

you need a .htaccess file in the root of your project (where index.php is located) containing the text below:
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Reply
#3

(01-10-2017, 04:57 AM)It\s true! That works for me! Also this tip appears in General Topics/CodeIgniter URLs/Removing the index.php file in the CodeIgniter documentation. eagle00789 Wrote: you need a .htaccess file in the root of your project (where index.php is located) containing the text below:
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Reply




Theme © iAndrew 2016 - Forum software by © MyBB