0

I would like to redirect/forward a URL on my testdomain. The URL is for example: http://www.mydomaintest.com/feed and I would need that to forward to http://www.mydomaintest.com/feed/stories.

I have tried the GUI URL Rewrite in the IIS manager but the redirect is not working. This sort of rewrite is very easily done on Linux machines but is giving me serious trouble on IIS. I've also tried modifying the web.config file with no success.

I've attempted the method, rewrite rules and redirect rules and nothing is working.

Here are all the tutorials I've followed before asking this question: http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

http://knowledge.freshpromo.ca/seo-tools/301-redirect.php https://stackoverflow.com/questions/10399932/setting-up-redirect-in-web-config-file https://www.iis.net/configreference/system.webserver/httpredirect

Thank you

0
  1. First download install Microsoft Web Platform installer

  2. open web platform application search URL rewrite and install

  3. Go to IIS manager --> sites --> check right side column --> added to URL rewrite module

  4. Double click URL rewrite -->click add rules -->select (inbound rules)blank rules --> Enter the name for your rule

  5. Pattern's box inside Enter this ".*" without quote

  6. select condition --> click add button

    i)-- condition input --> {HTTP_HOST}
    ii)-- pattern --> "http://www.mydomaintest.com/feed" without quote

  7. scroll down Select action type --> Redirect --> visible one text box --> enter the text box inside "http://www.mydomaintest.com/feed/stories". without quote

  8. click apply button and automatically save your rule

  9. restart your site or server

0

Create a text file with the following code in it and save it as default.aspx in the /feed/ sub-folder in the webroot.

<% Response.Redirect("/feed/stories/"); %>

Crude, but it works. Sometimes the simplest method is the best. This method produces a 302 (temporary redirect). If you need to do a 301 permanent redirect, here: https://stackoverflow.com/questions/10673303/301-redirect-in-asp-net-4-0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.