SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question IIS ISAPI Rewrite Walkthrough

    I need someone to walk me through how to use the ISAPI rewrite for IIS.

    Currently, it has been "setup" by my IT department and I uploaded my httpd.ini file and basically nothing happened.

    Do services need to be restarted when doing this or reset something? (FYI - I don't have IIS access)

    Am I uploading the right file, is the code right, etc?

    Code:
    RewriteRule /sitemap.html /index.html [RP, I]
    Could an .htaccess file be used instead?

    Thanks

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2007
    Location
    Baltimore, MD
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rebirth Studios View Post
    I need someone to walk me through how to use the ISAPI rewrite for IIS.

    Currently, it has been "setup" by my IT department and I uploaded my httpd.ini file and basically nothing happened.

    Do services need to be restarted when doing this or reset something? (FYI - I don't have IIS access)

    Am I uploading the right file, is the code right, etc?

    Code:
    RewriteRule /sitemap.html /index.html [RP, I]
    Could an .htaccess file be used instead?

    Thanks
    What version are you using? lite or full?
    Shane Bauer
    .NET and Ruby on Rails

  3. #3
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lite

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2007
    Location
    Baltimore, MD
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rebirth Studios View Post
    lite
    Where did you put the ini file? Lite only allows a global config, not a per-site config. If you're putting it in your site root, it won't work. I believe you need to put it in the same directory as the filter.
    Shane Bauer
    .NET and Ruby on Rails

  5. #5
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dropped it in the root, I don't believe I have access to go anywhere deeper, so what is the remedy; would we need to purchase the full version, and if so, how would that work differently?

  6. #6
    SitePoint Zealot
    Join Date
    Dec 2007
    Location
    Baltimore, MD
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rebirth Studios View Post
    I dropped it in the root, I don't believe I have access to go anywhere deeper, so what is the remedy; would we need to purchase the full version, and if so, how would that work differently?
    You don't need to purchase a full version if you're ok with one global configuration (one site). If you're ok with it, then get your IT department to give you more access or tell them to drop it in the directory whenever you make a change.

    If you get the full version, you should be able to drop the file into the root of the site.
    Shane Bauer
    .NET and Ruby on Rails

  7. #7
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since it's an .ini file, does this require resetting/restarting anything?

  8. #8
    SitePoint Zealot
    Join Date
    Dec 2007
    Location
    Baltimore, MD
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rebirth Studios View Post
    Since it's an .ini file, does this require resetting/restarting anything?
    I don't believe that's required. From what I remember it detects changes and automatically reloads the rules.
    Shane Bauer
    .NET and Ruby on Rails

  9. #9
    SitePoint Member
    Join Date
    May 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which version are you using? v2 or v3? The syntax of your rule is v2 compatible.

  10. #10
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    v3

  11. #11
    SitePoint Member
    Join Date
    May 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to use this code

    RewriteRule /sitemap.html /index.html [RP, I]

    you must use v2.

    The v3 you are using, uses apache mod_rewrite like syntax and you should change the configuration like this

    RewriteEngine On
    RewriteRule /sitemap.html /index.html [R=301,NC]

    Although, V2 has been very stabile for years and is a very reliable product, unfortunatelly v3 appears to be quite unstable with many complaints in the product's forum, and I wouldn't use it in production environments. I recommend that you either switch to v2, or if you wish to use apache like syntax, switch to IIS mod-rewrite, which is rock solid and better product overall. Unfortunatelly, this last has no free version.

    As for using .htaccess files, only the paid version of IIS mod-rewrite pro and isapirewrite full v3 support .htaccess.
    Last edited by StanB; Apr 11, 2008 at 03:01.

  12. #12
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StanB View Post
    The v3 you are using, uses apache mod_rewrite like syntax and you should change the configuration like this

    RewriteEngine On
    RewriteRule /sitemap.html /index.html [R=301,NC]
    Ok, so if I stick with v3 and use the code like you suggest, can I make this change from the root folder, where the website files reside or would I need deeper access?

    What is the file called, and would anything need to be reset or restarted after changing the file?

    Also, when you mentioned stability, what kind of adverse affects would those be, and which version would best suit our setup (Windows 2008, IIS7) ?

    Thanks!

  13. #13
    SitePoint Member
    Join Date
    May 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have already answered your first question. Only IIS Mod-Rewrite Pro and ISAPI Rewrite FULL v3 support distributed configuration files (.htaccess). Both product versions require $$. All other modules available out there support single configuration file and need admin access.

    Both products monitor configuration changes. No need to reset anything.

    You might want to visit Helicon's support forum and have a look at recent posts discussing stability issues with ISAPI rewrite v3. I personally experienced hangs when testing ISAPI rewrite v3 with errors like

    A process serving application pool 'DefaultAppPool' suffered a fatal communication error with the World Wide Web Publishing Service

    which simply means app pool crash...

    ISAPI Rewrite V2 is very stable, but it's old stuff. IIS Mod-Rewrite is rock solid too and overall better product, but quality has its price. The pro version which is good for your requirements costs some 150 bucks. They also have a cheaper version for 70 or so, but lacks .htaccess support. ISAPI rewrite full is 100 bucks.

  14. #14
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, we're using the v3 Full Demo, but have had no success...

    I tried the .htaccess method with the code:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^sitemap\.shtml$ index.shtml [R=301,NC]
    Does IIS have to be configured to accept .htaccess files somehow?

    Is there a way to use httpd.ini instead or does it have to be .htaccess?

  15. #15
    SitePoint Member
    Join Date
    May 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This rule is suitable for .htaccess and it should have worked.

    IIS doesn't know anything about .htaccess, so there is nothing to tune there.

  16. #16
    SitePoint Guru Rebirth Studios's Avatar
    Join Date
    Mar 2003
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are there other settings which could negate the .htaccess from working?

    Without having administrative access, how can I troubleshoot?

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •