redirect site.com/index.php to site.com

Discussion in 'Apache' started by GFX^^, Jun 30, 2006.

  1. #1
    how do i do that? i
     
    GFX^^, Jun 30, 2006 IP
  2. sunday

    sunday Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RedirectMatch 301 ^/index.php$ http:// www. example. com/

    Fix the spaces in the link.
     
    sunday, Jun 30, 2006 IP
  3. GFX^^

    GFX^^ Well-Known Member

    Messages:
    1,421
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    168
    #3
    doesn't work :s it puts that it is doing to much redirections
     
    GFX^^, Jun 30, 2006 IP
  4. sunday

    sunday Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Where did you put the code? Show the entry.
     
    sunday, Jul 1, 2006 IP
  5. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There is normally no need to redirect from "/index.php" to "/".

    You probably do not want to have a part of the links going to "/index.php" and another part going to "/". As, in most cases, there are no external links pointing to "/index.php", the best thing to do is to edit your site and to replace all links to "/index.php" by a link to "/".

    Jean-Luc
     
    Jean-Luc, Jul 1, 2006 IP