301 redirect for .htm extencion

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
9/26/2013 7:38:36 AM
Gravatar
Total Posts 8

301 redirect for .htm extencion

Hello Admin.
My old site was  build on static html and had .htm extension
Now I need to redirect to new url. 
Exmple: was "test.htm" - new "test"
I tried to rewrite them by url 301 redirect in advenced tools, but this not work
May by you have some trick for my situation?

9/26/2013 10:30:23 AM
Gravatar
Total Posts 18439

Re: 301 redirect for .htm extencion

I suggest use IIS url re-write module for such a task instead of trying to make mojoportal do it, you can google about that.

or it is also possible to configure redirects from Web.config as in this article

9/26/2013 3:10:11 PM
Gravatar
Total Posts 8

Re: 301 redirect for .htm extencion

Thank a lot.
solution
 <location path="test.htm">
    <system.webServer>
      <httpRedirect enabled="true" destination="http://www.domain.ru/test" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>
urlmaping not work on .net 4

9/27/2013 12:13:28 PM
Gravatar
Total Posts 18439

Re: 301 redirect for .htm extencion

stuff in the <system.WebServer section only works when using an Integrated app pool, I don't think it will work in a Classic app pool and it probably will not work in versions of IIS lower than 7. other configuration issues may also affect it.

I just tested this on my local machine:

<location path="test.htm">
    <system.webServer>
      <httpRedirect enabled="true" destination="http://demo.mojoportal.com/blog.aspx" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>

and when I tried localhost/test.htm it did redirect me

 

You must sign in to post in the forums. This thread is closed to new posts.