Issue with shared hosting (Domain name does not load) |
09-16-2022, 02:49 PM
(This post was last modified: 09-16-2022, 02:52 PM by anmar_dev. Edit Reason: Adding more details )
Hi everyone,
here is the thing. localhost development works fine. as i try to configure codeigniter4 into a shared hosting issues with routes. I use softaculouse to install CI4 on the main directory (public_html). when i try to configure the routes things work fine except when i write the domain name. example https://domain.com/ (Issue) it will send me to https://domain.com/public/ (Code 500) I contacted support they claim the issue that in public folder im not allowed to add .htaccess so they deleted for me htaccess file in public. things work fine. however; when i write https://domain.com/ ci4 works but the url is https://domain.com/public How to remove /public ? by the way https://domain.com/home (No problem) https://domain.com/en (No Problem) after modifying routes using {locale} Note: By the way i did try to follow the shared host guide.. im facing exactly the same issues.
I enjoy coding in codeigniter4. SurveyIgniter a project where i learn about codeigniter4.
Your DOCUMENT_ROOT must domain.com/public_html/public (setting in control panel hosting) and public_hml/.htaccess not needed
Simple CI 4 project for beginners codeigniter-expenses
I'm on shared hosting and I'am allowed .htacess files, but mine has to be under public_html.
I just rename public to public_html and change the path in Paths.php and running on local I have to change the path in spark. That's it. 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 |