WordPress MU 3.01 Works, but my existing rule breaks

Topics: User Forum
Sep 16, 2010 at 6:37 PM
Edited Sep 19, 2010 at 6:52 PM

On my IIS 6, 64bit,..I got IIRF x64 working fine with the wordpress 3.01 Multi-Site installation at the root level http://domain.com on my dev site.  I setup two additional sites with word press.


So,..I have an developmed an .asp e-commerce site with one rule. That doesn't work.

RewriteRule ^/jewelry/(.*)/(.*)/$ /Productdetails.Asp?title=$1&PID=$2

ie. http://domain.com/jewelry/Crystal_Necklace_Set/189/

but if I go directly to my asp,..then it works. http://domain.com/productdetails.asp?title=Crystal_Necklace_Set&pid=189

The wordpress URL Rewrite rules is given to us..and its the same for everyone no mattter how many blogs you setup.
So, if I paste their rules,..the blogs work..but then my one rule doesn't work. I have spent many weeks on this, and can't seem to figure it out.

Help most appreciated. Below is the content of my IIRF.ini file. I pasted the original rules.


# IIRF.ini
RewriteLog C:\IonicRewrite\IonicLog\iirfLof.out
RewriteLogLevel 5

#-------domain.com Re-write rule to make nicer URLS for products------------

RewriteRule ^/jewelry/(.*)/(.*)/$ /Productdetails.Asp?title=$1&PID=$2

#--- WordPress Rewrite Rules for Multisite- original code with no changes -------------------------

RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,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]
RewriteRule . index.php [L]


Sep 19, 2010 at 5:01 PM

You say that the rule "doesn't work", but you don't describe the results you see.  Here's what I suggest:  check the IIRF log file to determine what IIRF is doing with the request.

Things to check: 

  1. Is a subsequent rule rewriting the ProductDetails.asp URL?  This seems the most likely problem, and will be apparent when you examine the logfile.  If this is the case you may wish to consider adding a [L] to the end of the special rule for BhartiJewelers, to prevent subsequent rules from being processed. 
  2. Are you modifying the correct IIRF.ini file, and is it being loaded into IIRF as expected?  The initial IIRF logfile signature will show what file and what rules get loaded into IIRF.
  3. Is /jewelry a virtual directory in IIS?  If so, then you'll need to set an IIRF.ini file in the physical directory corresponding to that virtual directory.
  4. It could also be that the RewriteBase is affecting the action of the jewelry rule. RewriteBase is intended for use at the top of the IIRF ini file, and I'm not sure what happens when you put it after the initial rule.  (check the documentation on this) If this is the problem, the IIRF logfile will show that your special rule isn't matching properly. 


Good luck.


Sep 19, 2010 at 6:55 PM

Thanks,  by adding the [L]  and then having   RewriteEngine On   rightafter got everything working.

Thanks again.