.htaccess FILE HELP . . . where is my error in the code ?

Discussion in 'Apache' started by locals, Sep 1, 2009.

  1. #1
    Here is my code i am trying to use :

    
    Options +FollowSymlinks
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    #handle
    RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).MYDOMAINNAME.com [NC] 
    RewriteCond %{SCRIPT_FILENAME} !^/[COLOR="DarkRed"]MYDOMAINNAME[/COLOR]com [NC] 
    RewriteRule ^(.*)$ /[COLOR="darkred"]MYDOMAINNAME[/COLOR]com/$1 [L]
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    </IfModule>
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
    
    Code (markup):
    In the areas I highlighted in red . . . is " com " supposed to be after it there.

    I am getting a " Internal Server Error 500 "

    Thanks for your help !
     
    locals, Sep 1, 2009 IP
  2. senthil_sivanath

    senthil_sivanath Member

    Messages:
    360
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Try this

    RewriteRule dumps/(.*)\.html$ /download/dumps/showquestion.php?exam=$1 [QSA,L]

    It works for me
     
    senthil_sivanath, Sep 4, 2009 IP
  3. locals

    locals Well-Known Member

    Messages:
    1,677
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    153
    #3
    sorry that looks like it is for a different script . . . this is the htaccess for WordPress MU
     
    locals, Sep 4, 2009 IP