1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

301 root to index redirect

Discussion in 'Apache' started by 2Scoops, Oct 5, 2005.

  1. #1
    Is it possible to use a 301 redirect like this:

    www.mysite.com to www.mysite.com/index.php

    I have tried a few combinations with no luck.

    Doing index.php to root isn't a option :rolleyes:
     
    2Scoops, Oct 5, 2005 IP
  2. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #2
    Is index.php the default on your server (probably not)?

    Assuming no, then redirect www.mysite.com/{default home page here} to www.mysite.com/index.php
     
    minstrel, Oct 15, 2005 IP
  3. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #3
    Try adding this to your .htacces:
    
    RewriteRule ^$ /index.php [R=301, L]
    RewriteRule ^/$ /index.php [R=301, L]
    
    Code (markup):
     
    frankm, Oct 15, 2005 IP
  4. 2Scoops

    2Scoops Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes index.php is default.

    This gives me the internal server error message.
     
    2Scoops, Oct 16, 2005 IP
  5. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #5
    :confused:

    Then if index.php is the server default (I realize it's the default page for your site), I'm not sure I understand the problem. Why would you need to redirect www.domain.com to www.domain.com/index.php? It's going there anyway.
     
    minstrel, Oct 16, 2005 IP
  6. 2Scoops

    2Scoops Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Its a pr leak i want to fix.. Right now i have incoming links to both root and index. Index having a higher pr.

    The site is a toplist site that the incoming vote links pass on pr to the index.php. I have tried to redirect index.php to root but causes errors with the vote codes.
     
    2Scoops, Oct 16, 2005 IP
  7. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #7
    I really don't think it's important enough to be worrying about. The important issue "is do both links get visitors to your home page?" and the answer to that is "yes".

    Most potential visitors who know about your site will type in only the domain name anyway. Anything else is only a Toolbar PR issue and that's pretty much meaningless.
     
    minstrel, Oct 16, 2005 IP
  8. 2Scoops

    2Scoops Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Its not a big issue really but there are other benfits to having a higher pr page like selling text links and other sites would be more inclined to join the list because of a high pr.
     
    2Scoops, Oct 16, 2005 IP
  9. 4Comparison

    4Comparison punkah walla

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I agree with you 2Scoops.

    Just fixed one my sites that had an inadvertant internal link to my index.php. Site wide. Ooops.

    I was contemplating the same fix your are attempting. My solution was to use the myurl.com as the base and change all the references to index.php back to myurl.com. Normally, any external IBL will not specifiy index.php.

    PR is not what is used to be, but sharing weight among two identical pages is undoubtably counter productive.
     
    4Comparison, Oct 22, 2005 IP