How do you redirect your site?

by BJ Min
7 replies
hi,

i use frontpage and was wondering how do you redirect
your site?

i want my site to appear in a landing page i made which is not the original
index...i use htm files (frontpage)...

any codes would be appreciated...

thanks
BJ
#redirect #site
  • Profile picture of the author Harry Behrens
    Not totally sure if this is what you mean, but the way I do redirect for a static HTML file is to insert the following tag inside the HEADER section of the webpage:

    <META HTTP-EQUIV="refresh" CONTENT="0;URL=http://www.url.com">

    The "0; part is the time before redirecting, so if you want it to wait 5 seconds then redirect it would be "5;URL= and so on.

    I believe Frontpage lets you go into the page's code with a tab in the editor, so it should be easy to insert from there...
    Signature

    - Harry Behrens

    {{ DiscussionBoard.errors[842397].message }}
  • Profile picture of the author BJ Min
    thank you...i have just inserted that exact code in my index.htm pages for all my subdirectories...

    by the way, i also put that in my ERROR PAGES using CPANEL...

    i guess that's pretty much it huh?

    bj

    ps...when i try to redirect through CPANEL REDIRECT, it doesn't work
    for some reason after i put in the code you sent me...if you know why,
    please post...if you don't know, thanks anyways!
    {{ DiscussionBoard.errors[842419].message }}
  • Profile picture of the author adam123
    hey,

    just put these into your .htaccess files and you're done:

    ErrorDocument 400 /errors/badrequest.html
    ErrorDocument 401 /errors/authreqd.html
    ErrorDocument 403 /errors/forbid.html
    ErrorDocument 404 /errors/notfound.html
    ErrorDocument 500 /errors/serverr.html


    with these you can handle all type of errors

    All the best,
    Adam
    {{ DiscussionBoard.errors[842507].message }}
  • Profile picture of the author Gene Pimentel
    HOLD ON! The "meta refresh" method is bad for SEO. You should use a permanent redirect. Open notepad. Enter this code:

    Code:
    <?php
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://www.newdomain.com/page.html");
    exit();
    ?>
    Naturally, replace the URL with your own landing page URL. Save it as index.php (not .txt). Upload it to your domain, and you're done. If you have an index.html in the directory, you'll need to remove it.
    {{ DiscussionBoard.errors[842524].message }}
    • Profile picture of the author Harry Behrens
      Originally Posted by Gene Pimentel View Post

      HOLD ON! The "meta refresh" method is bad for SEO. You should use a permanent redirect. Open notepad. Enter this code:
      You know, I had read about this, so I was aware of it, but somehow my mind just completely blanked it out when I read/replied to this thread. Good catch.
      Signature

      - Harry Behrens

      {{ DiscussionBoard.errors[842639].message }}
  • Profile picture of the author adam123
    you can use php redirect too

    <?php
    header( 'Location: http://www.yoursite.com/new_page.html' ) ;
    ?>

    put these lines to your index.php file and replace the yoursite where you want to redirect
    Originally Posted by BJ Min View Post

    hi,

    i use frontpage and was wondering how do you redirect
    your site?

    i want my site to appear in a landing page i made which is not the original
    index...i use htm files (frontpage)...

    any codes would be appreciated...

    thanks
    BJ
    {{ DiscussionBoard.errors[842526].message }}
  • Profile picture of the author The Pension Guy
    You can not place it anywhere - it has to be in the "head" section of your html site, i.e. between the <head> and </head> tags.

    Just a side note: this kind of redirect is seen by search engines as temporary redirect... and in most cases what people want would be a permanent (301) redirect.

    Read more why you should NOT use meta refresh:
    301 redirect - Google Search
    Signature

    {{ DiscussionBoard.errors[842532].message }}

Trending Topics