How to redirect default.aspx to my index page

Discussion in 'Programming' started by Matthew Sayle, Mar 23, 2015.

  1. #1
    I purchased a dropped domain with some older backlinks that still drive some traffic to the site.

    However, when I built MY site, I just have a standard index page - but all of the older backlinks are mydomain.com/default.aspx

    Is there a way I can add default.aspx to my file manager and redirect all traffic to index.php?

    THANKS!
     
    Matthew Sayle, Mar 23, 2015 IP
  2. PDD

    PDD Greenhorn

    Messages:
    67
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    23
    #2
    Add this to your .htaccess
    Redirect 301 /default.aspx /index.php
    Code (markup):
     
    PDD, Mar 23, 2015 IP
  3. StGeorgeHosting

    StGeorgeHosting Greenhorn

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    You can also add a javascript code at the beginning of the default.aspx file after the head tag

    <head>
    <script type="text/javascript">
    <!--
    window.location="http://www.yourdomain.com/index.php";
    //-->
    </script>
    Code (markup):
     
    StGeorgeHosting, Mar 26, 2015 IP