Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Need to redirect files in one sub-directory to a different sub-directory in IIS

$
0
0

I recently consolidated several domains to one, and have in place 301 redirects from the 2 that are no longer used to the other. However seems I didn't account for a number of specific files in sub-directories, which I realized today are giving 404s. I came across this web config code from Ross Hawkins, below, but am unsure how to apply it, what folder it should be in, or if it solves my problem.

There are 2 scenarios. In one, the files are in a sub-directory of the main website and i want to redirect them to a specific sub-directory, and in the other, they are in a sub-directory of one of the domains that are no longer used (but still on my server) and i want to redirect them to specific files in a sub-directory on the main website.

I've Googled this quite a bit, and found web config code but not sure if what I've seen will do what I want. From Ross Hawkins:

<rule name="toservices" stopProcessing="true">
<match url="^(analysis-design|custom-development|webhosting|websites|video).*" ignoreCase="true"/>
<action type="Redirect" url="/services/" redirectType="Permanent" appendQueryString="true" />
</rule>

thanks for any help!

Steve


Viewing all articles
Browse latest Browse all 780

Latest Images

Trending Articles



Latest Images