• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter web.config index.php rewrite inside a subdirectory


My website folder structure is like below.

Application Root
|- administration
|--|- application
|--|- system
|--|- index.php
|--|- web.config
|- application
|- system
|- index.php
|- web.config

Two CI framework installed here.
  1. site root
  2. administration subdirectory
Here I am talking about administration subdirectory.

My web.config URL Rewrite is like below.

                <rule name="Index">
                    <match url="^(.*)$" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    <action type="Rewrite" url="index.php/{R:1}" />
problem is, if I remove index.php i.e.
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:

it works fine.

I want to remove index.php from URL.

My question is,
  1. How could I perform it through web.config ?
  2. How could I perform it through .htaccess ?

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.