I have installed Codeigniter 4 on Raspbian and everything seems to be working fine.
My web directory is /var/www/html
Inside there are two folders containing two different Codeigniter-4 apps that I would like to invoke with:
blue.ddns.net
->/var/www/html/blue/public/index.php
black.ddns.net
->/var/www/html/black/public/index.php
So I'm creating a .htaccess
file to put in the folder /var/www/html/
to handle the two requests
Well, I'm still at step 0 because I can't get the .htaccess
file to work properly.
Below I attach a copy of the file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /var/www/html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ blue/public/index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
The Rewrite module is activated
the error that appears in /var/log/apache2/error.log
is:
/var/www/html/.htaccess: Expected </IfModule> before end of configuration, referer: https://blue.ddns.net/