Apache mod_rewrite Redirectmatch rule in ISAPI?
4 posts
• Page 1 of 1
Apache mod_rewrite Redirectmatch rule in ISAPI?
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
(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?
- 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?
Re: Apache mod_rewrite Redirectmatch rule in ISAPI?
Please try this instead:
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ http://www.yourdomain.com/$4 [NC,R=301]
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ http://www.yourdomain.com/$4 [NC,R=301]
Re: Apache mod_rewrite Redirectmatch rule in ISAPI?
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.
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.
Re: Apache mod_rewrite Redirectmatch rule in ISAPI?
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.
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests