Question

I have a Wordpress install and a Miva Store install that I'm trying to setup with SEO friendly links on IIS6 with ISAPI_Rewrite. When we initially setup Wordpress, we found that the default htaccess setup wouldn't work for us, because we had physical directories that we didn't want rewritten.

So for example, one of our sections is "research". There is an actual research folder on there with lots of files that we link to. So in order to get around this issue, I removed this from the default htaccess file:

RewriteCond %{REQUEST_FILENAME} !-d

So this is how my htaccess file looked like pre-store:

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [NS]

That all works fine and great. The problem now is that I want to add a pretty link for Miva called Store. So I added this to the mix:

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !/store/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [NS]
#Miva Pretty Links
RewriteCond %{REQUEST_URI} /store/$ [NC] 
RewriteRule (.*) /mm5/merchant.mvc?Screen=SFNT&Store_Code=GOH [NS]
RewriteCond %{REQUEST_URI} /store/product/(.*)/(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Store_Code=GOH [NS]
RewriteCond %{REQUEST_URI} /store/category/(.*)/(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=CTGY&Category_Code=%1&Store_Code=GOH [NS]
RewriteCond %{REQUEST_URI} /store/product-category/(.*)/(.*)/(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Category_Code=%2&Store_Code=GOH [L]

With ISAPI_Rewrite Lite 3.1.0.85 this worked exactly how we wanted. When we upgraded to the full version of 3.1.0.89 it did not. All of the Wordpress stuff worked, but the Store redirected to a Wordpress 404 page.

Any ideas? I know that I need to make an exception to the Wordpress RewriteRule RewriteRule . /index.php [NS] but no combination seems to work for me.

Thanks!

Était-ce utile?

La solution

Take a look at the ISAPI_Rewrite logs, it'll tell you the order of processing the request. very useful to see what wrong in case LazyOne's suggestion didn't work

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top