Dumb SEO Questions

(Entry was posted by Jenny Gomes on this post in the Dumb SEO Questions community on Facebook, Saturday, May 9, 2015).

Subdomain 301 redirect

Hello Community,

Please help me out. I want to redirect one of my my website`s page to a subdomain using web.config file.  For Example.. I want to 301 redirect www.example.com/index.htm to http://newpage.example.com .. Please suggest me - What rule should I use in web.config file?

This question begins at 00:32:25 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 00:32:25
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions G+ community.

  • Jenny Gomes: Hello Community,

    Please help me out. I want to redirect one of my my website's page to a subdomain using web.config file. ; For Example.. I want to 301 redirect to .. Please suggest me - What rule should I use in web.config file??
  • Dave Elliott: i presume it is an cms you are using. (dnn, umbracco?)

    Web.config was always annoying to write diverts for so i tended to do it on the IIS server rather than the config file.

    That said the code looks like this:

    <configuration>
     ;  ; <location path="page1.htm">
     ;  ;  ;  ; <system.webServer>
     ;  ;  ;  ;  ;  ; <httpRedirect enabled="true" destination="" httpResponseStatus="Permanent" />
     ;  ;  ;  ; </system.webServer>
    </location>
    </configuration>

    You can also use rules to divert say everything in one folder to a different folder etc but i don't have code bookmarked for that!
  • Edwin Jonk: Personally I am lost with this question. And I really like  ;answer. Maybe  ;can provide more....
  • Edwin Jonk: Maybe  ;knows more...
  • Jim Munro: I have an allergic reaction at the mention of the web.config file. It's happening again. :)

    I think Dave's answer is perfect.

View original question in the Dumb SEO Questions community on Facebook, Saturday, May 9, 2015).

Reference Links