: How can I redirect all my files on old URLs to new URLs on IIS? I've been looking and trying out different pieces of code for months to no avail. Most of what I have found is for .htaccess,
I've been looking and trying out different pieces of code for months to no avail. Most of what I have found is for .htaccess, and not for IIS.
I have two scenarios:
subdomain1.domain.com to subdomain2.domain.com keeping everything appended intact. For example .com/ehd/tickets/71921/edit <- this must remain the same.
The other scenario is:
domain.com/subfolder to subdomain.domain.com again keeping everything appended.
Is this even possible? I've tried everything I can think of with the resources I've found. Creating a CNAME doesn't change the URL in the address line.
I would welcome any help I could get!
More posts by @Berumen354
1 Comments
Sorted by latest first Latest Oldest Best
You need to install url_rewrite plugin for IIS. It is available on IIS7 and up though it will tell you that it only works on IIS7.
You will then write the redirect commands in web.config and it is very tricky due to the difference of how url_rewrite handles rewriting.
The best option I can suggest is to try it out on a local IIS installation with URL_rewrite installed, there is a URL_rewrite builder embedded inside IIS.
Be careful since IIS also have an outbound rewriting, this will change your outgoing url links.
For more info, check this website www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.