ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Removing index.php? on Windows IIS

July 16, 2007 11:11am

Subscribe [11]
  • #16 / Feb 10, 2009 10:58pm

    bronwen

    22 posts

    Thanks studio AMK!

    Our host followed the instructions described on the ISAPI module’s page. Is that different from your suggestion?

    Cheers,
    Bronwen

  • #17 / Feb 11, 2009 12:00am

    studioamk's avatar

    studioamk

    18 posts

    Hi again, Bronwen…

    My instructions worked fine for me.

    Btw, did you install the filter at a particular website or folder or websites root..?
    Can share me the steps that you’ve taken to install it…?

    One of the most important things is; how you define Rewriting Rules…
    So, can share us yr definitions?
    Again, where did you place your definition file?

    Beside that, sometimes, IIS service needs to be restarted after adding/removing a filter.

  • #18 / Feb 11, 2009 12:14am

    bronwen

    22 posts

    Hi StudioAMK,

    Thanks again for your help and support.

    We’ll pass the question onto the host and get back to you.

    Cheers,
    Bronwen

  • #19 / Feb 11, 2009 8:54am

    bronwen

    22 posts

    Ok. This is what the server said in answer to your questions… does it help?

    “The steps I followed were the ones provided by Brent Cartier’s post.

    The isapi module was installed on your the website only (not the IIS
    Root), restarting bit I’m aware off (same sort of thing for php
    configuration changes), definition file and isapi.dll file were
    installed under C:\windows\system32\inserv folder, correct permissions
    given.”

    Cheers,
    Bronwen

  • #20 / Feb 11, 2009 9:22am

    studioamk's avatar

    studioamk

    18 posts

    Do me favor… Please follow my instructions closely… Ok…

    1. Your rewriting definition file name must be given the same as the rewriting dll’s file name. (most of the case, it should be IsapiRewrite4.ini)

    2. In the definition file, clear everything, copy and paste the following line and save the file.

    RewriteRule ^/(.*)$ /rewrite_test.php?title=$1 [I,L]

    3. Now create a rewrite_test.php file as follow.

    <?php
      $Page = $_GET["title"];
      echo "It works! You were looking for $Page.";
    ?>

    4. Place the rewrite_test.php file in the root folder of your website, so that it can be accessible at http://www.yoursite.com/rewrite_test.php

    5. Now try browse to http://www.yoursite.com/helloworld. You should get the following response.

    It works! You were looking for helloworld.
  • #21 / Feb 12, 2009 5:47am

    bronwen

    22 posts

    Hi StudioAMK,
    Thanks for all your help.
    Our server tried again tonight but wrote this:

    Followed the instructions again, however now your site is totally
    unreachable, when I turned the ISAPI module off, your site becomes
    active again.

    Unfortunately I’m not sure why its not working, but at the same time,
    the instructions were very clear and concise, and we’ve followed them
    to the letter.

    I don’t know what to do at this point. Any other ideas?

    Cheers,
    Bronwen

  • #22 / Feb 13, 2009 2:38am

    bronwen

    22 posts

    One more thing our server asked

    Do you know of any other IIS rewriting utilities to try

    All help appreciated.

  • #23 / Feb 13, 2009 4:58am

    studioamk's avatar

    studioamk

    18 posts

    One more thing our server asked

    Do you know of any other IIS rewriting utilities to try

    All help appreciated.

    Hi again Bronwen…

    Yes… We have many other utilities…
    But, I dont want you to quite… Coz it’s the best…
    Beside, we are already half-way there…

    So, as a final try out please help me check what permission settings have been given to the filter dll and its ini file…

    OR

    For testing purpose, could you please ask your server to move it to a new folder, lets say C:\URL_Rewriter, and give full permissions to that folder (Grand Everyone account and IUSER_ServerName to Full Control of the folder). Then, load the filter from that folder and see, it works or not…

  • #24 / Feb 14, 2009 1:17am

    grundybin

    1 posts

    Hi StudioAMK,

    Thanks for your help thus far, its been very much appreciated.

    I’ve actually already tried what you’ve suggested in the last reply, to the point of granting everyone access, and even running the website with administrative privileges just to see if it would work, unfortunately no go, the website becomes unreachable.

    Below is the exert of the error as per the event log, looking up the page on the below error code, it would appear the the error is because access is behing denied, but after giving both the app pool, and the website administrative access, as well as the everyone groups full access to the folder under the C:\ directory which is currently housing the .dll’s I’m pretty much stumped on how to resolve the issue.


    And after typing all this, I’ve discovered that the account wasn’t a member of the IIS_WPG group, adding Bronwen’s sites account to this group seems to have solved the error.

    Thank you again very much for all your help.

    http://blogs.msdn.com/david.wang/archive/2005/06/21/HOWTO_Diagnose_and_Fix_Common_ISAPI_Filter_Installation_Failures.aspx

    Event Type:  Error
    Event Source:  W3SVC-WP
    Event Category:  None
    Event ID:  2268
    Date:      14/02/2009
    Time:      4:05:06 PM
    User:      N/A


    Could not load all ISAPI filters for site/service.  Therefore startup aborted.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 05 00 00 00           ....

  • #25 / Feb 14, 2009 11:52pm

    bronwen

    22 posts

    Hi everybody,

    We’re still trying to remove index.php

    As you can see in grundybin posts, our webhoster installed the rewrite module successfully. It works with the test php file.

    To rewrite the url in our Expression Engine installation we used the following rewrite rules according to Brent Cartiers Post.

    #Change the following to your renamed system folder path:
    RewriteRule ^/system/(.*)$ /system/$1 [I,L]
    
    #Add rules for folders you want to accept without rewriting:
    RewriteRule ^/images/(.*)$ /images/$1 [I,L]
    RewriteRule ^/themes/(.*)$ /themes/$1 [I,L]
    RewriteRule ^/amember/(.*)$ /amember/$1 [I,L]
    
    #This allows querystring to be added to the url (like {path=logout} )
    RewriteRule /(.*)\?(.*)$ /index.php\?q=$1&$2 [I,L]
    
    #This removes index.php? from the urls
    RewriteRule ^/(.*)$ /index.php?/$1 [I,L]

    Then I deleted index.php in ee’s control panel, Force URL query strings is also set to no.

    After setting all those things up I visited my site and clicked on a link to check if the rewriting works fine. Unfortunately it didn’t. After clicking on a link a 404 page opened.

    Grundybin (our server guy) guesses that it must be an issue with the rewrite rules.
    Can you see if there is a mistake in the rules or if something is missing?

    Thanks for all your help!
    Bronwen

  • #26 / Apr 02, 2009 12:35pm

    sfgolfer

    41 posts

    I got the Ionics ISAPI Rewrite up and running on a Windows 2000/IIS 5.0 box.

    The only issue I have is with the system rewrite…

    RewriteRule ^/system/(.*)$ /system/$1 [I,L]

    Navigating to http://domain/system does not work (404 page).

    I have to include index.php, http://domain/system/index.php in order for the Control Panel to appear.

    Otherwise, all is well with the rewrite.

  • #27 / Apr 02, 2009 6:16pm

    bronwen

    22 posts

    Hi,
    I didn’t sort it but am in the process of changing servers and am hoping that will answer the problem.
    Cheers,
    Bronwen

  • #28 / Sep 02, 2009 4:27pm

    jaemie

    17 posts

    I actually am getting the same error on one of my sites (404s). What I *think* is happening is that the DLL is not being recognized? I followed all the steps exactly. However, when I remove “index.php” as the index file name, it seems to work. So, I was thinking that the URLs were being rewritten, but I was receiving 404s when the pages were accessed. When I went back in and added “index.php” as the index file name, I could then see that the URLs were not being rewritten at all.

    I checked the DLL and saw the status had a red arrow - for not active or whatever it means in this context. So, despite following this step-by-step, URLs are not being rewritten for me.

    Anything I could have overlooked in activating the DLL?

    —-
    - EE Version 1.6.8
    - Ionic ISAPI Rewriter 1.2.6
    - Read permissions set on both the dll and ini
    - ini text copied straight from the first post, but modified to use my system folder


    Edited to Add:
    By applying the ISAPI filter to the Website Directory in IIS instead of the actual website, the DLL was loaded. However, I was still getting 404s and/or blank pages ... still stumped. I also played around with permissions to make sure I was setting read permissions for both the IIS_WPG and IUSR_*Computer-Name*.

  • #29 / Jan 30, 2013 11:26am

    MINDSCREEN

    218 posts

    Hi

    Our website hosted in Windows based server and the EE2 installed under wwwroot/new directory and accessed by a subdomain link as http://new.pixelstegendarmkanker.nl

    But, other templates links are as http://new.pixelstegendarmkanker.nl/index.php?/de_stichting , I want to remove the index.php? from the link.

    Then I have found this forum and prepare httpd.ini with following commands:-

    [ISAPI_Rewrite]
    #Change the following to your renamed system folder path:
    RewriteRule ^/system/(.*)$ /system/$1 [I,L]
    
    #Add rules for folders you want to accept without rewriting:
    RewriteRule ^/images/(.*)$ /images/$1 [I,L]
    RewriteRule ^/styles/(.*)$ /styles/$1 [I,L]
    RewriteRule ^/themes/(.*)$ /themes/$1 [I,L]
    
    #This allows querystring to be added to the url (like {path=logout} )
    RewriteRule /(.*)\?(.*)$ /index.php\?q=$1&$2 [I,L]
    
    #This removes index.php? from the urls
    RewriteRule ^/(.*)$ /index.php?/$1 [I,L]

    But, using this code, the images, styles are not working properly for http://new.pixelstegendarmkanker.nl and we can’t access the Admin panel also. Can anyone Please, look into this and give me a solution.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases