Author Topic: CodeIgniter 4 on subdomain .htaccess.bak issue  (Read 2953 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CodeIgniter 4 on subdomain .htaccess.bak issue
« on: March 15, 2022, 04:16:24 PM »
Hi all fellow CWP Users.

I tried to install CI4 on the subdomain folder and I followed the topic from this URL:
https://forum.centos-webpanel.com/dns/subdomain-500-internal-server-error/

When I changed the .htaccess to .htaccess.bak and tried the subdomain, it worked.

But, when I try to access the other path like /login or /logout, it does not work.
I must type /index.php/login or /index.php/logout to access the desired page.

Normally, the page can be accessed without /index.php because .htaccess will override it.
But the .htacess.bak seems like not working and if I changed it back to .htaccess, I will get the error message.

I still use the default setting for the .htaccess.bak and haven't changed anything after creating the subdomain.

Any solutions for this issue?
« Last Edit: March 15, 2022, 04:18:07 PM by corda »

Offline
****
Re: CodeIgniter 4 on subdomain .htaccess.bak issue
« Reply #1 on: March 16, 2022, 02:14:39 AM »
check the log files for the subdomain under /usr/local/apache/domlogs/(subdomain).error.log to figure out what setting in .htaccess is causing the error.
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: CodeIgniter 4 on subdomain .htaccess.bak issue
« Reply #2 on: March 17, 2022, 06:29:18 AM »
check the log files for the subdomain under /usr/local/apache/domlogs/(subdomain).error.log to figure out what setting in .htaccess is causing the error.

Wow! Thank you so much. You are a lifesaver!

I have seen the log and found that Options All is not allowed. So when I remove the Options All in CodeIgniter 4 public folder, it works!
The default in CodeIgniter 4 .htaccess has the Options All, so just remove it and it runs!

Thank you much sir! Really appreciate your help.