Results 1 to 3 of 3

Thread: [How To] redirect a file to another url

  1. #1
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,960

    Default [How To] redirect a file to another url

    You can do this several ways, including javascript, however, cPanel has a function in it that allows you to make redirects using a simple web-based interface.

    It should be noted that some search engines like google frown on certain types of redirects, so if you are trying to get high ranks in google or other search engines you should note their policy on redirects, and be sure to use the appropriate type of redirect.

    If you are trying to redirect your homepage with cPanel
    Click the "redirects" icon. Make sure the first box is not empty, this can cause a nastly loop that will not redirct anything. Type index.html in the first box and then the destination url in the second.

    If you are trying to redirect any other page
    Click the "redirects" icon. Type foo.html in the first box and then the destination url in the second. This assumes foo.html is the old file that you want to redirect to the new url.

    For a visual tutorial, click here.
    Last edited by Matt; 12-03-2006 at 01:37 AM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

  2. #2
    Scott's Avatar
    Scott is offline Certified Glow Sage
    Join Date
    Oct 2006
    Posts
    27

    Default

    This seems simple enough however, when I apply the redirect and then test it, I keep getting a 404.

    Here is a list of the current redirect:
    /pubs/newsletters/newsletter-sign-up-allmar-technologies.php >> http://www.allmartech.com/lists/index.php?p%3Dsubscribe

    Any suggestions would be helpful.
    Thanks
    Last edited by Scott; 06-04-2007 at 11:43 PM.

  3. #3
    Scott's Avatar
    Scott is offline Certified Glow Sage
    Join Date
    Oct 2006
    Posts
    27

    Default

    It appears I found the trouble. cPanel mod'd the htaccess file with a RedirectMatch, I went and manually changed the htaccess file to a RedirectPermanent and everything appears to be working.

    Im sure the RedirectMatch would work under normal circumstances, however, I was redirecting to an URL where I was passing args and I suspect this was messing with the preg. I also converted chars to their ebcdic values and that did not work either.

    This might save someone else some time later.

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14