Hi @Asif Ullah thanks for the question.
You can usually resolve this issue by modifying your web.config
file and CodeIgniter’s config.php
file as shared on this similar SO thread. Try the following these steps:
- In your
web.config
file, replace your current rule with this one:
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
</rule>
- In your CodeIgniter’s
config.php
file, change theurl_protocol
to'PATH_INFO'
:
$config['url_protocol'] = 'PATH_INFO';
This will tell the URL rewrite module to use the rewritten URI instead of the original URL
Also you can also check your Apache access log and error log to see where the browser request is being routed<sup>.</sup> You can also activate logging in CodeIgniter by setting $config['log_threshold'] = 2;
Don’t forget to set appropriate permissions to the system/logs
directory so Apache can write log files to it.
Best,
Grace