I have a WordPress site using the /%postname%/
permalink structure.
I’m also using the old websites ASP driven database to show hundreds of product pages.
My problem is that the ASP pages have their own rewrite engine. So when clicking a link that points to an ASP database page I get a 404 error in WordPress because that page and URL doesn’t exist in the WordPress database.
This link to the dev site is http://www.nowlcdev.com/ which is using WordPress and this page http://www.nowlcdev.com/wholesale-pottery.asp with all the product links is ASP driven. So once that link is clicked you are no longer in WordPress.
I tried using a RewriteRule
to ignore .asp
but it didn’t work.
Everything is on the same server.
I’ve tried these rewrite rules separately:
RewriteCond %{REQUEST_URI} !^(wholesale-pottery|wholesale-pottery/.*)$
RewriteCond %{REQUEST_URI} !^wholesale-pottery/index.php$
RewriteRule ^wholesale-pottery/? - [L]
Please let me know if you need any more information.
Thanks!
It’s not a case of the ASP pages having a separate rewrite engine, mod-rewrite and .htaccess don’t work on IIS7+, you need to use the IIS url rewrite module and web.config. This applies to WordPress just as much as any other IIS site, and the WordPress setup should actually generate a web.config file for you. Most tutorials however will just assume you’re running WordPress on Apache and tell you how to configure .htaccess
(NB If you’re running IIS6 then there’s no native rewrite engine. A lot of IIS6 servers though have the third party Isapi Rewrite filter from Helicon Tech installed, which emulates mod-rewrite to some extent http://www.helicontech.com/isapi_rewrite/)