redirect a directory and all sub-directories

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: redirect a directory and all sub-directories

03 Oct 2017, 06:56

Hello.

The following rule should be enough:

RewriteEngine On
RewriteRule ^blog http\://www.oehq.com [NC,R=301]

Please note this rule is designed to work in .htaccess file. If you are putting it into httpd.conf you need to use this one:

RewriteEngine On
RewriteRule ^/blog http\://www.oehq.com [NC,R=301]

If the redirect is not issued, try to follow troubleshooting section from documentation first.

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

Re: redirect a directory and all sub-directories

04 Oct 2017, 05:55

Enable detailed error messages in IIS for your site to at least see the error text, it may contain a clue on what is happening:

https://blogs.msdn.microsoft.com/rakkimk/2007/05/25/iis7-how-to-enable-the-detailed-error-messages-for-the-website-while-browsed-from-for-the-client-browsers/

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 14 guests