1
votes

Here is my .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

I am not sure where the error is coming from but when I access subdomain.domain.com the website loads, when I got to subdomain.domain.com/dashboard/the website also loads, but when I click a link on this webpage which should go to subdomain.domain.com/system/patients it is giving me an error 403 but when I manually type in subdomain.domain.com/index.php/system/patients the webpage is working fine.

Anyone knows how to fix this issue?

Edit: Below are the error logs from Apache

[Tue May 15 13:30:39.765075 2018] [authz_core:error] [pid 5460:tid 1984] [client ::1:57447] AH01630: client denied by server configuration:
C:/xampp/htdocs/mdcsoftware/system/patients
[Tue May 15 13:30:42.085656 2018] [authz_core:error] [pid 5460:tid 1984] [client ::1:57447] AH01630: client denied by server configuration:
C:/xampp/htdocs/mdcsoftware/system/patients
[Tue May 15 13:30:43.826818 2018] [authz_core:error] [pid 5460:tid 1984] [client ::1:57447] AH01630: client denied by server configuration:
C:/xampp/htdocs/mdcsoftware/system/patients
[Tue May 15 13:32:12.990937 2018] [authz_core:error] [pid 5460:tid 1984] [client ::1:57469] AH01630: client denied by server configuration:
C:/xampp/htdocs/mdcsoftware/system/patients
[Tue May 15 13:32:14.865024 2018] [authz_core:error] [pid 5460:tid 1984] [client ::1:57469] AH01630: client denied by server configuration:
C:/xampp/htdocs/mdcsoftware/system/patients

2
"Anyone knows how to fix this issue?" <- your Apache error log probably knowsPhil
have u set your base_urlPradeep
@pradeep yes it isBeldion
Also check to make sure you don't have a real directory or file system/patients. If that exists, the RewriteRule will not applyPhil
set $config['index_page'] = ''; it should be blankPradeep

2 Answers

3
votes

if you have error with your index.php . please try the below code once it may help you.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

Thanks.

1
votes

I was able to fix the issue by changing the folder name from "system" to "clinic". I think the word "system" is a reserved word in Codeigniter 3.1.8, though I don't have any documentation to back this up. Thank you to everyone who tried helping me.