Apache mod_rewrite Redirectmatch rule in ISAPI?

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 2
Joined: 11 Dec 2015, 18:30

Apache mod_rewrite Redirectmatch rule in ISAPI?

11 Dec 2015, 18:40

Hi I am trying to add a redirect rule to address a permalink change to a wordpress site. The redirect rule which should be added to the .htaccess file (on Apache), I'm told, would be

Code: Select all
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ http://www.yourdomain.com/$4


(from https://yoast.com/research/permalink-helper.php)

Will this work in ISAPI (my site is on a windows server, and I use ISAPI to whitelist IPs to my admin pages)? Or does it require different conditions/variables, etc?

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Apache mod_rewrite Redirectmatch rule in ISAPI?

15 Dec 2015, 11:19

Please try this instead:

RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ http://www.yourdomain.com/$4 [NC,R=301]

User avatar
Posts: 2
Joined: 11 Dec 2015, 18:30

Re: Apache mod_rewrite Redirectmatch rule in ISAPI?

15 Dec 2015, 16:57

Thanks! My webhost provider suggested this

RedirectRule ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ http://yourdomain.com/$4 [I,R=301]

What is the difference between that and what you've suggested above? Will they do the same thing or slightly different?

Thanks so much for responding to my question, I wish there was a course I could take to learn this properly. :?

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Apache mod_rewrite Redirectmatch rule in ISAPI?

16 Dec 2015, 08:19

The rule from your hosting provider seems to be for ISAPI_Rewrite version 2 syntax while my rule is for ISAPI_Rewrite version 3. I don't actually know which version is installed on your server, but since you are posting your question to version 3 forum I provided the rule for version 3.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 8 guests