WordPress.org

Support

Support » Multisite » Multisite IIS 6 Ionics Isapi Rewrite Filter

Multisite IIS 6 Ionics Isapi Rewrite Filter

  • Andybann

    @andybann

    Hi all

    My set up is complicated but in summary is:

    Win 2003 > IIS 6 > .NET site running on primary domain > WordPress in root of this domain running under Phalanger within the .NET application pool 🙂

    Working URLS:
    http://www.mysite.com/index.php
    http://www.mysite.com/wp-admin/
    http://www.mysite.com/anotherSite/index.php
    http://www.mysite.com/anotherSite/wp-admin/

    Not Working:
    http://www.mysite.com/postname/
    http://www.mysite.com/categoryname/postname/
    http://www.mysite.com/anotherSite/
    http://www.mysite.com/anotherSite/categoryname/postname/

    My Isapi Rewrite File (iirf.ini) is below:

    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    #store original URL in custom header (substitute for missing REQUEST_URI header in IIS)
    RewriteHeader X-REWRITE-URL:  ^$    %{REQUEST_URI}
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$RedirectRule ^(.+)$ $1/ [R=301]
    RedirectRule ^/index\.php/(.*)$ /$1 [I,R=301]
    RewriteRule ^/(?!index\.php|wp-|xmlrpc)(.*)$ /index.php/$1 [I,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L,U]

    Can anyone see the obvious issue? I will be eternally grateful if I can resolve this!

    NOTE: I know the above sounds like a crazy set up but it’s the only way I could think to get multi site working within the root of the primary domain whilst keeping lots of legacy asp, aspx and html running whilst we slowly replace these!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    @ipstenu

    Andybann

    @andybann

    Yes I had read that post before and tried variations around that but my situation is different and I think it’s index.php not being set as default document or something like this either at the OS, PHP. web.config or iirf.ini level.

    I can’t make index.php the default document via Windows as index.html and index.asp need to be default the old pages to work whilst we do the move.

    Moderator Ipstenu (Mika Epstein)

    @ipstenu

    [Nevermind that one!]

    Oh you have it in the same folder as the index.html page… Ugh, yeah that’s going to cause problems. I don’t nkow if you can workaround it 🙁

    Andybann

    @andybann

    I was thinking along the lines of something like this but can’t quite get it to work excluding asp, html and aspx files

    # Prepend any request missing the index.php prefix to allow cleaner URLs
    RewriteRule ^/(?!index\.php|wp-|xmlrpc)(.*)$ /index.php/$1 [I,L]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite IIS 6 Ionics Isapi Rewrite Filter’ is closed to new replies.
Skip to toolbar