Urgent .htaccess question

Discussion in 'Apache' started by fordP, Jan 25, 2008.

  1. #1
    Guys, I run a script that's subpages are dependent upon the scripts index.php being name index.php

    The problem is, I don't want to use that index.php anymore, so I have created a file newindex.php and changed Directory Index to have newindex.php first

    in my htaccess file I have:

    
    DirectoryIndex newindex232.php
    
    Options +FollowSymlinks
    RewriteEngine on
    
    # I removed a lot of stuff from here for readability
    
    RewriteBase /
    
    RewriteRule index.php newindex.php [L]
    
    Code (markup):
    Now when you go to mysite.com, you get the content of newindex.php, and the url still shows www.mysite.com

    Will the search engines know that the content came from newindex.php, or will they keep assuming it is index.php, even though Directory Index is set to newindex.php?
     
    fordP, Jan 25, 2008 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Nothing outside the server knows a rewrite has taken place unless you specificly send a redirect status code through the flags.
     
    joebert, Jan 25, 2008 IP