request URL not found |
Hi guys, I am struggling to make my CI4 app to work properly in an internal LAN linux machine, I have installed Apache,php 8.3 and mySql in xubuntu 22.04 LTS
The rewrite mod is enable in Apache. I made several tries with a a .conf file in /etc/apache2/sites-enabled, nothing work. My current file is I do sudo a2ensite and the filename and restart apache2 Code: <VirtualHost *:80> I have place an .htaccess file like in the CI4 web site Code: #RewriteEngine On In app/Config/App.php I have public string $baseURL = 'http://192.168.0.18/b2bci4/public/'; I can get the login screen but when I click submit to the controller Login/doLogin I got 404... All is working right in my xampp when I start spark server and do http://localhost:8080 Can someone point me what I am doing wrong please? Thank you all!
mainPath .htaccess
RewriteEngine On RewriteCond %{THE_REQUEST} /public/([^\s?]*) [NC] RewriteRule ^ %1 [L,NE,R=302] RewriteRule ^((?!public/).*)$ public/$1 [L,NC] public path in .htaccess .htaccess RewriteEngine on RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA]
I recommend to read the official documentation:
https://codeigniter4.github.io/CodeIgnit...ith-apache (04-29-2024, 05:16 PM)mywebmanavgat Wrote: mainPath .htaccessHi! Thank you for this tips but didnt work. Same problem (04-29-2024, 05:38 PM)kenjis Wrote: I recommend to read the official documentation: Hi Sir, thanks for the reply but I got those .htaccess fragments from the official documentation, because they didnt work, I posted my problem here to see if someone could help me out. I dont know much about Apache, just basic stuff. I just copy and pasted code from documentation
Your configuration is "Hosting with VirtualHost".
https://codeigniter4.github.io/CodeIgnit...irtualhost Apache configuration sample: Code: <VirtualHost *:80> The CI4 default .htaccess in public/: Code: # Disable directory browsing
(05-01-2024, 09:04 AM)captain-sensible Wrote: i would ask what exactly is your objective ? Hi! What I want to do is setup an vmware machine on a company costumer and host the site for internal use only. So I first asked a colleague to create a vmware machine in our LAN for me to test the site. If all works, then export the machine and import it on the costumer LAN. the site works great in my W11 machine using xampp and start a server with php spark serve, but not in the vmware machine |
Welcome Guest, Not a member yet? Register Sign In |