CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Redirect URL

  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Redirect URL

    Hello,

    I am not IT person.
    I want to redirect visitor of my( old and not in use )web site abc.com to new web site xyz.com.
    How can I do it and what I need to do it? Can I do it myself or do I need to go to website expert?Can you explain me in details step by step?


    Your answer is appriciated.
    Thank you.

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Redirect URL

    If you still own the domain, you simply put of a single page that performs the action, or configure the server software (IIS, Apache, etc) to the new IP.

    Alternativle (again if you still own the original domain, you can simply register the same IP address for both DNS entries.

    If you DONT on the site anymore, then you are out of luck, and who ever does own it, can do what ever they like.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Jan 2009
    Posts
    4

    Re: Redirect URL

    Create a simple index.HTML with this tag:

    <meta http-equiv="refresh" content="0;URL=http://www.yourwebsite.com">

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: Redirect URL

    If you are using Apache, you really should use a 301 redirect. Put the following in an .htaccess file on the root of the abc.com web server.

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.xyz.com/$1 [R=301,L]
    If you are using IIS, then you can set up a permanent redirect through the internet services manager.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured