custom redirection question

5 replies
I own two domain 1. ipushproxxxx.com (tld) and second is ipp,my (cctld), now i would like to create a redirect from cctld to tld, for example ipp.my/download/ to ipushproxxxx.com/download/ and for the rest of the page too ......

reason : cause i can type short url to my client via SMS or whatapps ....
any solution on it or easy method without creating everypage and put redirect code in??
thanks
#custom #question #redirection
  • Profile picture of the author blinkenlights
    You can probably do this with .htaccess and mod_rewrite rules.

    Or, just use framesets, if you want the short cctld to remain in the browser's location bar.
    {{ DiscussionBoard.errors[9730551].message }}
    • Profile picture of the author JackWebb
      Not exactly sure what you're trying to do but a simple php redirect is pretty easy to do.


      <?php session_start();
      header('Location: http://yourwebsite/somepage.php');
      exit();
      ?>
      Good Luck!
      Jack
      {{ DiscussionBoard.errors[9733612].message }}
      • Profile picture of the author joshmiller
        Originally Posted by JackWebb View Post

        Not exactly sure what you're trying to do but a simple php redirect is pretty easy to do.




        Good Luck!
        Jack
        This or javascript
        Code:
        window.location.replace("http://stackoverflow.com");
        Or more advisable...
        .htaccess redirecting...

        Code:
        Redirect 301 / http://www.mynewwebsite.com
        {{ DiscussionBoard.errors[9738178].message }}
  • Profile picture of the author Rob Whisonant
    Create a .htaccess file on the domain you want to redirect from. Add these lines to it.

    RewriteEngine on
    RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]

    This will redirect page by page. So http://first-domain.com/page3.html will redirect to http://new-domain.com/page3.html etc.

    Of course change newdomain.com to the domain name you are sending the clicks to.

    Re's
    Rob Whisonant
    {{ DiscussionBoard.errors[9738518].message }}

Trending Topics