Codeigniter web.config index.php rewrite inside a subdirectory - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 2.x (https://forum.codeigniter.com/forumdisplay.php?fid=18) +--- Thread: Codeigniter web.config index.php rewrite inside a subdirectory (/showthread.php?tid=66347) |
Codeigniter web.config index.php rewrite inside a subdirectory - rajdutta393 - 10-12-2016 Hi, My website folder structure is like below. Code: Application Root Two CI framework installed here.
My web.config URL Rewrite is like below. Code: <rewrite> PHP Code: $config['index_page'] = ''; from site_root/administration/application/config/config.php, any controller function shows 404 page not found. But if I place it i.e. PHP Code: [b]$config['index_page']='index.php'; it works fine. I want to remove index.php from URL. My question is,
I have asked this same question here but got no answer. I google it and found similar question here without any answer. For your information, I am using CI 2.2.6 Regards. RE: Codeigniter web.config index.php rewrite inside a subdirectory - puneetkumar - 10-26-2018 It's for webconfig file to remove index.php <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <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> </rules> </rewrite> </system.webServer> </configuration> RE: Codeigniter web.config index.php rewrite inside a subdirectory - acharjeeavijit - 11-20-2018 (10-26-2018, 11:06 PM)puneetkumar Wrote: It's for webconfig file to remove index.phpThe above code not working for me. my folder structure as follow httpdocs |- admin |--|- application |--|- system |--|- index.php |--|- web.config | |- application |- system |- index.php |- web.config this hosted in windows hosting server. if i add $config['index_page']='index.php'; in config file under application/config/config.php. site is working but when i remove $config['index_page']=''; like this that is showing 404 page not found error.please help me out from this issue. Thanks[/quote] |