Help me for configuring htaccess

Discussion in 'Apache' started by ish1301, Nov 1, 2006.

Thread Status:
Not open for further replies.
  1. #1
    My .htacess file is exactly like this one

    ErrorDocument 404 /404.php
    
    <Files mortgage>
    	ForceType application/x-httpd-php
    </Files>
    
    <IfModule mod_php4.c>
    	php_flag register_globals on
    </IfModule>
    
    RewriteEngine on
    RewriteRule m/(.*)/a/(.*)/faq_id/(.*) index.php?m=$1&a=$2&faq_id=$3
    RewriteRule m/(.*)/a/(.*)/start/(.*) index.php?m=$1&a=$2&start=$3
    RewriteRule m/(.*)/a/(.*)/quote/(.*) index.php?m=$1&a=$2&quote=$3
    RewriteRule m/(.*)/cat_id/(.*) index.php?m=$1&cat_id=$2
    RewriteRule m/(.*)/a/(.*) index.php?m=$1&a=$2
    RewriteRule m/(.*) index.php?m=$1
    Code (markup):
    And i m using the forcetype to access "mortgage" file under root
    at url http://nps12.netpowersoft.com/mortgage/alabama/ It's showing error code 500.

    Is this because of .htaccess or else please help me i am :confused:

    thanks for any help
     
    ish1301, Nov 1, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule m/([^.]+)/a/([^.]+)/faq_id/([^.]+)$ index.php?m=$1&a=$2&faq_id=$3 [L]
    RewriteRule m/([^.]+)/a/([^.]+)/start/([^.]+)$ index.php?m=$1&a=$2&start=$3 [L]
    RewriteRule m/([^.]+)/a/([^.]+)/quote/([^.]+)$ index.php?m=$1&a=$2&quote=$3 [L]
    RewriteRule m/([^.]+)/cat_id/([^.]+)$ index.php?m=$1&cat_id=$2 [L]
    RewriteRule m/([^.]+)/a/([^.]+)$ index.php?m=$1&a=$2 [L]
    RewriteRule m/([^.]+)$ index.php?m=$1 [L]

    Take out the

    <Files mortgage>
    ForceType application/x-httpd-php
    </Files>

    <IfModule mod_php4.c>
    php_flag register_globals on
    </IfModule>

    stuff and see what works.
     
    Nintendo, Nov 1, 2006 IP
  3. ish1301

    ish1301 Banned

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    @Nintendo

    thanks for the quick reply !!!

    I am wanna use them all (forcetype to file "mortgage" + mode rewrite + 404 error file name + register_globals)

    is it possible ?
     
    ish1301, Nov 1, 2006 IP
  4. ish1301

    ish1301 Banned

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    (It doesn't work) If i change .htaccess to ..

    <Files mortgage>
    	ForceType application/x-httpd-php
    </Files>
    Code (markup):
    but it goes OK when i change .htaccess to ..

    
    ErrorDocument 404 /404.php
    
    <IfModule mod_php4.c>
    	php_flag register_globals on
    </IfModule>
    
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule m/([^.]+)/a/([^.]+)/faq_id/([^.]+)$ index.php?m=$1&a=$2&faq_id=$3 [L]
    RewriteRule m/([^.]+)/a/([^.]+)/start/([^.]+)$ index.php?m=$1&a=$2&start=$3 [L]
    RewriteRule m/([^.]+)/a/([^.]+)/quote/([^.]+)$ index.php?m=$1&a=$2&quote=$3 [L]
    RewriteRule m/([^.]+)/cat_id/([^.]+)$ index.php?m=$1&cat_id=$2 [L]
    RewriteRule m/([^.]+)/a/([^.]+)$ index.php?m=$1&a=$2 [L]
    RewriteRule m/([^.]+)$ index.php?m=$1 [L]
    
    Code (markup):
    now the problem is how i can use forcetype here ..... i am really very :confused: :confused: :confused:

    please reply if any thinks he could help me !
     
    ish1301, Nov 1, 2006 IP
  5. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #5
    Nintendo, Nov 1, 2006 IP
  6. ish1301

    ish1301 Banned

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Issue resolved :) :) :) :)

    Hostgator replied "In a PHPSuEXEC Environment, you need to use SetHandler instead of ForceType" ..

    thanks for your effort !
     
    ish1301, Nov 1, 2006 IP
Thread Status:
Not open for further replies.