Installing CI4.2.10 on Hostinger in a Subdomain |
I have a Hostinger account. I setup a subdomain we'll call "abc". And my main domain we'll call "maindomain.net".
The subdomain is pointed to a subdirectory inside of maindomain.net. The actual path in the shared hosting would be maindomain.net/public_html/abc/ This version of CodeIgniter doesn't seem to have a System folder which I've seen in other threads talking about configuration. I'm curious to know if anyone has some advice on getting this working in the subdomain. I've tried changing the FC_PATH inside of the public/index.php and no luck. I'm currently getting a 403 when I try to access abc.mydomain.net. Any advice?
If you can alter the location of of the subdomain folder, change it to abc/public instead of abc.
So that abc.maindomain.net forwards to maindomain.net/public_html/abc/public My hosting party uses the same setup (subdomain pointing to a subfolder) and this is what I had to do to make CI4 work. Quote:index.php is no longer in the root of the project! It has been moved inside the public folder, for better security and separation of components.
You can also refer to the tutorial here:
CI4 Production Deployment https://ozar.net/blog/web-development-ph...eployment/ CodeIgniter Wizard (CRUD code generator for Mac) instantly scaffolds Bootstrap-based web applications with an administrative interface (admin templates include Bootstrap5)
I was able to get the website to load after a few changes mentioned in the blog.
However, I do believe I've hit an .htaccess wall. I currently have: RewriteEngine On RewriteRule ^$ public/index.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(index\.php|css|javascript|images|robots\.txt|favicon\.ico) This will get me to the Home Page with no images loading, no javascript, and no css loading. None of the other pages of the websites are accessible. I feel like I'm close, just not sure what I'm missing. I figured it out. I ended up using: RewriteEngine on RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] Thanks everyone that replied! I appreciate the assistance
When I had my sub domain all I had to do was ftp everything to the sub domain folder and it worked fine.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |