SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    301 redirect in html file

    I have a client who has outdated pages and he wants me to put 301 permanent redirects for SEO purposes.
    His host doesn't allow you to upload .htaccess files
    It won't let me in the php.ini file either
    These files end in .html

    Any other ways of doing this?

  2. #2
    SitePoint Guru alecrust's Avatar
    Join Date
    Jun 2007
    Location
    London, UK
    Posts
    728
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mmm so in this instance only plain HTML is allowed.

    The only method I can think of is the <meta> refresh. However there is speculation that search engines don't like it. I would actually recommend changing host, but here is the method anyway that can be used in your .html files.
    Code:
    <meta http-equiv="refresh" content="2;url=http://www.example.com/newpage.html" />
    The 2 in that code is the number of seconds before it redirects.

    Let me highlight some problems of this:
    - If the redirect happens quickly (less than 2-3 seconds), readers with older browsers can't hit the "Back" button. This is a usability problem.
    - If the redirect happens quickly and goes to a non-existant page, your readers won't be able to hit the "Back" button. This is a usability problem that will cause people to completely leave your site.
    Honda Civic Forum - UK Civic Forum
    Web Host Reviews - Independent, honest host reviews
    My Portfolio - Simplicity is the ultimate sophistication

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That will generate a 302 redirect.

    There is no way to generate a 301 redirect from an HTML page, since the page isn't supposed to exist if you do 301 redirect.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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