htaccess 301 redirection...help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klinton
    So Fucking Banned
    • Apr 2003
    • 8766

    #1

    htaccess 301 redirection...help

    Hey , I want to redirect all traffic that goes to some directory to another url...
    htaccess looks like this:
    redirect / http://www.blabla.com/main.php?id=affiliate

    and It redirects to url, but adds old directory name at the end of url...so it finally looks like http://www.blabla.com/main.php?id=af...ddirectoryname

    how to avoid adding this old directory name to final url ?

    Thanks !
  • Antonio
    Too lazy to set a custom title
    • Oct 2001
    • 14136

    #2
    Code:
    redirect 301 /OLDDIRECTORY/ http://www.MYSITE.com/NEW_DIR/SOMETHING.HTML

    should work ^^^

    Comment

    • klinton
      So Fucking Banned
      • Apr 2003
      • 8766

      #3
      Forbidden
      You don't have permission to access /test/ on this server

      Comment

      • Antonio
        Too lazy to set a custom title
        • Oct 2001
        • 14136

        #4
        Originally posted by klinton
        Forbidden
        You don't have permission to access /test/ on this server

        just tested the code on one of my servers, works 100%

        where do you place your htaccess?

        if your site is
        Code:
        http://www.mysite.com/OLDIRECTORY/
        then your htaccess should be in the root directory

        if still doesn't work coctact your host, dunno

        Comment

        • klinton
          So Fucking Banned
          • Apr 2003
          • 8766

          #5
          I placed in it subdirectory...

          Well Thanks anyway,I'll set up redirection via php...don't want to mess with htaccess too much ;]

          Comment

          Working...