help with some .htaccess file rules

Discussion in 'Apache' started by ncarty97, Mar 5, 2012.

  1. #1
    I searched through the posts here, but nothing seemed to fix the problem I am having.

    Trying to fix a small problem on one of the sites I admin. It's hosted at Godaddy. There are two domains hosted on this one account, call them ABC.com and DEF.com. DEF.com's files are located at ABC.com/DEF/ (though if you go to DEF.com, you just see DEF.com)

    All of the pages are PHP scripts, so I included a RewriteRule in the .htaccess file:

    RewriteEngine On
    
    Options -MultiViews
    Options +FollowSymLinks
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ $1.php [L,QSA]
    
    Code (markup):
    For all of the ABC.com pages, just typing the page name (like index or events) and leaving off the .php, it works fine. If you do to ABC.com/DEF/index, it works fine. If you go to DEF.com/index, it gives "Internal Server error"

    I copied the .htaccess file into the DEF folder thinking maybe it couldn't see the ABC.com one when I go directly to DEF.com, but it didn't help. I tried the RewriteBase method described @ apache.org (can't post links yet) but it didn't help either.

    Anyone know what I am doing wrong? I appreciate any help.
     
    ncarty97, Mar 5, 2012 IP