I am suffering with a web config file that is not rewrite the url for my codeigniter application. here is the web config file.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Clean URL" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
here is my site : http://gandhitomodi.com
i am not able to get this kind of url http://gandhitomodi.com/controller/method/
for example
http://gandhitomodi.com/welcome/index/
Please Help me through this.
****Edited*****
here is the route.php
$route['default_controller']="welcome/index";
$route['sendmail']="welcome/send";
here is the config.php settings that i have changed.
$config['base_url']="http://gandhitomodi.com/";
$config['index_page']='';
$config['url_protocal']='PATH_INFO';`
Have you tries this method as mention here
https://blogs.msdn.microsoft.com/azureossds/2015/04/23/converting-apache-htaccess-rules-to-iis-web-config-using-iis-manager-for-azure-websites/
also it is mention over here
https://blogs.msdn.microsoft.com/azureossds/2015/09/28/convert-apache-htaccess-to-iis-web-config/
under the URL Rewriting section. It has the same .htaccess which I am using also there are many online converters to whom you can give a try
For your config file, try this article. It appears that your issue is on your action line.
<action type="Rewrite" url="index.php?{R:1}" appendQueryString="true" />
Change that to:
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
The question mark is causing your issue. Also, your match line might be changed to:
<match url="^(.*)$" ignoreCase="false" />
That is a bit more specific and might prevent some headaches later on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With