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.

Rewrite/Redirect index.php to ROOT

Discussion in 'Apache' started by AKnogood, May 23, 2008.

  1. #1
    AKnogood, May 23, 2008 IP
  2. Trusted Writer

    Trusted Writer Banned

    Messages:
    1,370
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #2
    This should be something like this:

    
    RewriteEngine On
    RewriteRule ^index\.(php|html|htm) http://www.titanarcade.com/  [L,R=301]
    RewriteRule ^index\.php?action=register$ http://www.titanarcade.com/index.php?action=register  [L,R=301]
    
    
    Code (markup):
     
    Trusted Writer, May 23, 2008 IP
  3. AKnogood

    AKnogood Active Member

    Messages:
    244
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Hi Trusted Writer,

    When I try your code it loop infinitely...

    And a clarification, when I was saying that I'd like for http://www.titanarcade.com/index.php?action=register to stay the same I was referring to any php string except index.php... So the only thing I'd like the script to do would be to rewrite/redirect http://www.titanarcade.com/index.php to http://www.titanarcade.com/ without rewriting/redirecting any http://www.titanarcade.com/index.php* .

    Thanks!
    Vincent
     
    AKnogood, May 23, 2008 IP
  4. JRBHosting

    JRBHosting Peon

    Messages:
    121
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Your web site's default directory index is index.php. Try adding this right above "RewriteEngine On":

    
    DirectoryIndex <ROOT_PAGE_HERE> index.php
    
    Code (markup):
    Replace <ROOT_PAGE_HERE> with the filename of the page that you would like to come up when the root of the page is called. This will prioritize that page above index.php, unless index.php is explicitly called.

    Jason
     
    JRBHosting, May 25, 2008 IP