We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Removing index.php from navigation urls in IIS 8

How Do I?

nigelfreeney's avatar
nigelfreeney
1 posts
9 years ago
nigelfreeney's avatar nigelfreeney

Expression Engine 2.10.1 Hi,

I’m using CodeIgnitor I have successfully written a rule in web.config which allows the web pages to be reached with friendly urls i.e.

//Working for requests but not for navigation
<rule name="Remove index" stopProcessing="true">
               <match url=".*" >
               <conditions logicalGrouping="MatchAll">
                 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" >
                 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" >
               </conditions>
               <action type="Rewrite" url="index.php" >
            </rule>

www.domainname.com/about works but so does www.domainname.com/index.php/about

I have also edit the config.php wwwroot/system/expressionengine/config

$config['index_page'] = '';

Unfortunately the on page navigation still includes /index.php/ in all the links. i.e. www.domainname.com/index.php/about

Can anyone suggest what I can do to remove it and complete this process?

Thanks,

NIgel

       
chris thacker's avatar
chris thacker
112 posts
9 years ago
chris thacker's avatar chris thacker

The rule I have that works is this:

<rule name="CLS EE" enabled="false" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="true" >
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" >
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" >
                    </conditions>
                    <action type="Rewrite" url="abc/index.php?/{R:1}" appendQueryString="false" >
                </rule>

Note that I have EE installed in a directory called “abc” so you’ll likely have to edit or remove that part.

This may not matter for your installation but my EE config.php file was modified to have this:

$config['uri_protocol'] = 'QUERY_STRING';
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.