Welcome Guest, Not a member yet? Register   Sign In
Best way to remove the public/index.php in local testing environment
#2

not sure i fully understand you but for local development say using apache(for CI4) and perhaps virtualhost approach then for instance in virtualhost entry would look like this:

<Directory "/srv/http/webappDirectoryname/public">
.........
''''''''''
</Directory>



So when /etc/hosts is done , mod rewrite is enabled in httpd.conf etc etc then when you enter domain name in adress bar of browser , its set up so that the web root is pointed to public directory of Ci4


So the only thing to do remove /index.php from url is to edit app/Config/App.php and make it look like this;


/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
public $indexPage = '';
Reply


Messages In This Thread
RE: Best way to remove the public/index.php in local testing environment - by captain-sensible - 06-06-2021, 02:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB