Rewrite Forbidden Error

Discussion in 'Apache' started by jackstist, Jan 30, 2011.

  1. #1
    My apache logs have this error for all the domain which uses .htaccess file.

    Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden:

    I added Options FollowSymLinks to .htaccess file but the error remains. I also tried with Options +FollowSymLinks but to no success.

    Most of the websites were running using .htaccess files from a long time, its now that this error starts appearing in my virtual domain log file.

    I believe there is something to be done on httpd.conf file but dunno which part needs editing. By the way I'm using Virtualmin Pro.

    Any help would be appreciated
     
    jackstist, Jan 30, 2011 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Does this error appearing for all domains using .htaccess or for only some of them this error is being generated?
     
    mwasif, Jan 30, 2011 IP
  3. jackstist

    jackstist Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah.. for all the domains using .htaccess . when i remove the file , the site works fine but without some functionalities.
     
    jackstist, Jan 30, 2011 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Is "Rewrite Forbidden" the exact error you see in the error log?
     
    mwasif, Jan 30, 2011 IP
  5. jackstist

    jackstist Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden:

    This is the error in apache logs that appears when i load the website
     
    jackstist, Jan 30, 2011 IP
  6. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #6
    Try this
    Options +FollowSymLinks
    <IfModule mod_rewrite.c>
    RewriteEngine On
    Code (markup):
     
    mwasif, Jan 30, 2011 IP
  7. jackstist

    jackstist Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    where shud i place it?
    In httpd.conf?
     
    jackstist, Jan 30, 2011 IP
  8. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #8
    No, in .htaccess.
    These 2 lines

    Options +FollowSymLinks
    <IfModule mod_rewrite.c>

    should go before

    RewriteEngine On
     
    mwasif, Jan 30, 2011 IP
  9. jackstist

    jackstist Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    That does not seem to work... Actuallly its getting redirected to var/www/html/error/noindex.html when detecting .htaccess
     
    jackstist, Jan 30, 2011 IP