Problem redirecting internal pages but not index page ... help me

Discussion in 'Apache' started by papa mia, Nov 20, 2010.

  1. #1
    Problem redirecting internal pages but not index page ... help me


    Hello

    I have a site at:

    example.com

    I want to move it to a subfolder, so that

    example.com

    will open:

    example.com/old


    Some of the pages include ( index.php?catid=.. )

    I want them also to redirect to:

    ( old/index.php?catid=.. )

    So I used this line in the .htaccess file:

    redirect 301 /index.php http://www.example.com/old/


    But I want to istall a new site to be open when you click:

    http://www.example.com

    I don't want http://www.example.com to redirect to http://www.example.com/old

    I just want to redirect pages that include ( index.php?catid=.. )
    to ( old/index.php?catid=.. )

    And by using the redirect rule above I am getting users redircted from my new site to the old site,

    which is not wat I want. I just don't want to lose visits through google to internal pages that include

    (index.php) in the urls.

    So I renamed the index file of my NEW site from index.php to default.php

    and I used this line in htaccess :

    DirectoryIndex default.php

    Which is working.

    But when I did that, example.com/old will not open the old site, it will open an "index of" page with

    the list of files and folders in the old site.

    I am not very good at English, and I don't know if i've made the issue clear, and described the problem

    will.

    Please help me on the right way to make the redirections without redirecting example.com to the old

    site.

    Thank you
     
    papa mia, Nov 20, 2010 IP
  2. papa mia

    papa mia Active Member

    Messages:
    89
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    78
    #2
    bump

    The problem is not complicated, but maybe I made it sound so by over-explanation :)

    I'm sure any expert on the subject will know the solution. And If you see the problem needs rephrasing please tell me.

    I need the answer badly
     
    papa mia, Nov 22, 2010 IP