.htaccess Help

Discussion in 'Programming' started by Dannyboyonline, Jun 30, 2008.

  1. #1
    I've been trying to install a script within a sub-directory of a wordpress blog.

    This script has it's own .htaccess file and it's giving me a 500 Internal Server Error. The script works fine when I remove the .htaccess file from the sub dir.

    What should I do?

    I think the .htaccess file from the wordpress script which lies in a higher directory level is interfering with the .htaccess file of this new script.

    What do you guys think?
     
    Dannyboyonline, Jun 30, 2008 IP
  2. EH Justin

    EH Justin Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The fact that you have a .htaccess higher in the directory tree should not make a difference, because what happens is the new .htaccess file will take control of it's current directory and any directory underneath it, in a sense vetoing out the previous .htaccess. Move the not working .htaccess file up to where the first .htaccess is, after you rename the first .htaccess. This will tell you if it's a problem with the .htaccess file or something else.
     
    EH Justin, Jul 1, 2008 IP
  3. Dannyboyonline

    Dannyboyonline Active Member

    Messages:
    602
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Well there is a problem with the .htaccess file as when i swapped it with the one on the higher directory, the script running there returned the same internal server error.

    What should I do would anyone be willing to check the file for me if I post it here, it's not that long.

    Thank you.
     
    Dannyboyonline, Jul 1, 2008 IP
  4. AliasXNeo

    AliasXNeo Banned

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Go ahead and post the contents and I'll see if I can spot anything.
     
    AliasXNeo, Jul 1, 2008 IP
  5. Dannyboyonline

    Dannyboyonline Active Member

    Messages:
    602
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #5
    # -FrontPage-
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
      
    <Limit GET POST> 
    order deny,allow 
    deny from all 
    allow from all 
    </Limit> 
    <Limit PUT DELETE> 
    order deny,allow 
    deny from all 
    </Limit> 
    
    php_flag session.use_trans_sid off
    
    RewriteEngine On 
    
    RewriteCond %{HTTP_HOST} . 
    RewriteCond %{HTTP_HOST}  !^www\. [NC] 
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1  [R,L]
      
    RewriteRule ^profile\/([^\/]+)/([0-9]+)     publicprofile.php?name=$1&id=$2     
    RewriteRule ^Category\/[^\/]+/([0-9]+)      index.php?catid=$1&mode=category    
    RewriteRule ^Article/[^\/]+/([0-9]+)/?(.*)  article.php?id=$1&act=$2            
    RewriteRule ^rss/[^\/]+/([0-9]+)            rssarticle.php?id=$1                
    RewriteRule ^myarticles/(.*)$               index.php?mode=myarticles 
    
    RewriteRule ^(.*)topauthorslist/	  topauthors.php?orderby=$1&ordertype=$2&namelike=$3&page=$4
    RewriteRule ^(.*)popularlist/	      populararticles.php?page=$2
    RewriteRule ^(.*)searchresult/	      indexser.php?page=$2
       
    
       
    
    
    Code (markup):
     
    Dannyboyonline, Jul 1, 2008 IP
  6. EH Justin

    EH Justin Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Remove this line:

     
    EH Justin, Jul 1, 2008 IP
  7. Dannyboyonline

    Dannyboyonline Active Member

    Messages:
    602
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Ok thanks I'll try that.
     
    Dannyboyonline, Jul 2, 2008 IP