Redirection Help

Discussion in 'Apache' started by sarathy, Apr 25, 2007.

  1. #1
    Hi guyz,
    can anyone help me on a 301 redirection through .htaccess

    seoism.info/<variable folders>/en to: seoism.info/<variable folders>

    like:
    seoism.info/23333/en to seoism.info/23333

    Thanks :)
    Sarathy.s
     
    sarathy, Apr 25, 2007 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    in .htaccess write ONE line:


    redirect 301 /23333/en http: // www . seoism.info/23333


    all one line - remove spaces in URL of domain above !

    make sure when doing above that you create a folder with REAL keywords as foldername and NO numbers as in your sample !!!!!!
     
    hans, Apr 25, 2007 IP
  3. sarathy

    sarathy Peon

    Messages:
    1,613
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hans,
    that 23333 is dynamic and changes to lacs of folders
     
    sarathy, Apr 25, 2007 IP
  4. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try: domain.com/.htaccess
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteRule ^([^/]+)/en/?(.*)$ http://www.seoism.info/$1/$2 [R=301,L]
    Code (markup):
     
    rodney88, Apr 25, 2007 IP
  5. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #5
    lakhs or crores of folders - never mind - as long as dynamic folder-names makes sense they will add to serps

    but above all:

    after your redirect -->> all folders at new locations need to have exactly same names/paths starting from new folder as the names before, else you get multiple crores of 404 from google and other SE!


    if you have any problems with the redirect i gave you
    then make sure your apache2 is configured properly

    if additional help is needed - then full apache version would be needed as well

    the mod_rewrite version offered above is another version of doing the same job

    i usually do the redirect-version in such cases
     
    hans, Apr 25, 2007 IP
    sarathy likes this.
  6. sarathy

    sarathy Peon

    Messages:
    1,613
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks Rondey , That worked :), Thankx hans for your replies., (unable to give rep, so replying)
     
    sarathy, Apr 26, 2007 IP