Skip to content Skip to sidebar Skip to footer

URL Redirection From A Html Page To An .aspx Page

I have a requirement where i have to use url redirection in my legacy web page (basically its a complete static html page). The requirement for me is to redirect the user everytime

Solution 1:

There are different options of doing so described here. You can basically add a meta tag to refresh the page after a second to aspx page or use javascript.


Solution 2:

You can use the ISAPI Rewrite and let the IIS server redirect your .html page. Use the following rule:

RewriteRule ^app/en/downloadsite.htm$ /app/newdownloadsite.aspx [NC,R=301,L]

Solution 3:

between the head tags, put this code.

<head>       
    <meta http-equiv="refresh" content="2;URL='http://web.vatsag.com/app/newdownloadsite.aspx'" />    
  </head> 

That will redirect after 2 seconds to http://web.vatsag.com/app/newdownloadsite.aspx

Content= Number of seconds to refresh URL = url path to redirect to The reason meta refreshes are discouraged is because spammers use them to redirect users from shell sites that have lots of keywords to non-legitimate sites. So search engines blacklist sites that use that meta refresh as belonging to spammers.


Post a Comment for "URL Redirection From A Html Page To An .aspx Page"