Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2007
    Posts
    143
    Plugin Contributions
    0

    Default trying to set up a 301 redirect by editing .htaccess file

    Hi
    i have opened this file up with bbedit and also gone onto my server cpanal>edit code, but there seems to be no code in there is this correct? i am trying to set up a 301 redirect as i have just done a website grade from website.grader.com and they say my site has Permanent Redirect Not Found

    any ideas how to get this to work.

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,132
    Plugin Contributions
    0

    Default Re: trying to set up a 301 redirect by editing .htaccess file

    Need more information to provide a good answer.

    Steps to reproduct the problems would be helpful as well.
    The learning is in the doing.

    Potent Products

  3. #3
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    3,184
    Plugin Contributions
    30

    Default Re: trying to set up a 301 redirect by editing .htaccess file

    http://www.beyondink.com/howtos/301-redirect.php

    Don't edit files like the ones above in anything like BB code.... PLain old notepad.. NOT wordpad or MS word.

    PSPad works great and has added notepad function - Freeware

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered.

  4. #4
    Join Date
    Apr 2007
    Posts
    143
    Plugin Contributions
    0

    Default Re: trying to set up a 301 redirect by editing .htaccess file

    i followed the link you gave me and i see this code but i really dont know the purpose of what i am doing, a redirect to me sounds like i am going to one url and that is telling me to goto another, why would i want to do that at a guess i am thinking its an error page thing?, silly question i know but i haven't really looked into this i am just going on what that website grader said:

    PHP 4 and PHP 5

    Single Page Redirect:

    <?php
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: http://www.new-url.com/');
    ?>

    Canonical Hostname Redirect (non-www to www):

    <%
    If InStr(Request.ServerVariables("SERVER_NAME"),"www") = 0 Then
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location","http://www." & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
    Response.End
    End if
    %>

  5. #5
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    3,184
    Plugin Contributions
    30

    Default Re: trying to set up a 301 redirect by editing .htaccess file

    Then back to Rob's answer we need more information... the codes you posted do not belong in your htaccess.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered.

 

 

Similar Threads

  1. Replies: 17
    Last Post: 14 Aug 2009, 06:14 PM
  2. SEO, htaccess and domain redirect
    By hubert in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2007, 08:19 PM
  3. 301 redirect in htaccess not working
    By FrenchFrog in forum General Questions
    Replies: 10
    Last Post: 24 Aug 2007, 12:36 AM
  4. Redirect with .htaccess?
    By BillNally in forum General Questions
    Replies: 2
    Last Post: 4 Sep 2006, 02:50 PM

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
  •