In IIS 6.0, is there an easy way to re-direct requests to a folder to another folder, while preserving the rest of the path.
e.g.
If I have moved the content from:
mysite.org.uk/stuff
to
stuff.mysite.org.uk/
Can I automatically redirect requests for specific pages like
mysite.org.uk/stuff/countrybriefing/tanzania/travel.html
to
stuff.mysite.org.uk/countrybriefing/tanzania/travel.html
I know that .htaccess can do things like this in Apache, is there an equivalent in IIS?
In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services. On the Select Role Services page of the Add Role Services Wizard, expand Common Http Features, select HTTP Redirection, and then click Next. On the Confirm Installation Selections page, click Install.
Format the redirect URL in the following way:
stuff.mysite.org.uk$S$Q
The $S
will say that any path must be applied to the new URL. $Q
says that any parameter variables must be passed to the new URL.
In IIS 7.0, you must enable the option Redirect to exact destination
. I believe there must be an option like this in IIS 6.0 too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With