Optional configurations

All bellow configurations are optional. This app must work without any of these configurations.

Set encryption key

Follow the guide provided in the official documentation of CodeIgniter4

Removing the index.php file in URLs

By default, the index.php file will be included in all URLs. For example, http://example.com/index.php/users. But if you need to get URLs without the index.php part like this http://example.com/users. It can be done very easily.

  1. Apache server 'mod_rewrite' module required (Not applicable for Nginx web server.).

    Apache server mod_rewrite module should be enabled, If this module was disabled. Then you may have to restart the Apache server in order to take the effect.

  2. Set 'indexPage' configuration to empty.

    Open [app_root]/.env file and locate # app.indexPage = 'index.php' configuration option. Then make it active by removing the # symbol and set it to empty string of characters.

                                    
                                        app.indexPage = ''
                                    
                                
  3. Create a .htaccess file (Not applicable for Nginx web server.).

    By default this app comes with a .htaccess.txt file in the public directory of this app. This file won't work since it's a .txt file. You have to rename that .txt file to .htaccess in order it to work.

    After you create a .htaccess file, you can delete or keep the .htaccess.txt file.

  4. Activate and set 'RewriteBase' rule in .htaccess file (Not applicable for Nginx web server.).

    By default RewriteBase rule in .htaccess file is commented out (Disabled). But you can active it by simple removing the # character in front of the RewriteBase rule.

    Before you activate RewriteBase rule or do any kind of modifications to the .htaccess file, please check bellow instructions. Because in some situations you don't have to do any modifications to the .htaccess file.

    1. If this app hosted in a root of the host. For example, http://example.com, http://www.example.com, http://localhost. Then you don't have to do any modifications to the .htaccess file.

    2. If this app hosted in a sub directory of the host. For example, http://example.com/appskull, http://localhost/appskull. Then you have to activate RewriteBase rule and set it. When setting the RewriteBase rule, always exclude the host part from the base URL.

      Examples:

      • Base url http://localhost/appskull/. It's RewriteBase rule should be RewriteBase /appskull/.
      • Base url http://localhost/apps/appskull/. It's RewriteBase rule should be RewriteBase /apps/appskull/.
      • Base url http://example.com/appskull/. It's RewriteBase rule should be RewriteBase /appskull/.
      • Base url http://example.com/apps/appskull/. It's RewriteBase rule should be RewriteBase /apps/appskull/.
      • Base url http://www.example.com/apps/appskull/. It's RewriteBase rule should be RewriteBase /apps/appskull/.

Email configurations

We don't use CodeIgniter4's built-in email service for sending emails in this app because it's not advanced enough to fully satisfy our needs. Instead, we use the Symfony Mailer PHP package for sending emails.

To set the mail DSN and few other configurations, use the SymfonyMailer.php configuration file located in the [app_root]\Nudasoft\App\Config directory.

Please refer to the official Symfony Mailer documentation for more information.

Set default timezone

By default this app's timezone set to UTC. But you can change it in the [app_root]/.env file.

                        
                            app.appTimezone = 'America/Adak'
                        
                    

You can find list of supported timezones via this URL: https://php.net/manual/en/timezones.php

Other configurations

There are many configurations available; please refer to the related chapter on the CodeIgniter4 official documentation for guidance on them.

Copyright © Nudasoft.