The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Global .htaccess

Discussion in 'Security' started by PCZero, Mar 10, 2013.

  1. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    33
    Trophy Points:
    28
    Location:
    Earth
    I have an htaccess file set up in /home to be set things at a global level for all accounts. Everything is working just fine with one exception...

    In the global file I have Rewrite enabled and several Rewrite rules. These are all function just fine for all accounts EXCEPT if a given account has additional Rewrite rules in its htaccess within its web root. In this case the global rewrite rules seem to be ignored and only the local ones are followed. As long as the user's htaccess has no rewrite rules, the combined effect of the global and user specific htaccess files seems to be in place and working fine.

    Questions:

    1) Is this the normal behavior for htaccess?
    2) How do I set things up so that the user specific htacces will always be additive to the user htaccess?
    3) I want the user htacess to have precedence over the global in case they both set a given value (such as ErrorDocument). IOW, if both set a ErrorDocument, I want the vale specified in the user specific htaccess to be the one used. Is this the standard and if not how do I set it so that this is how it will work?
     
  2. nithintou

    nithintou Member

    Joined:
    Dec 22, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    This is normal behaviour. You need the following in your per domain .htaccess or Virtualhost:
    RewriteOptions Inherit
     
Loading...

Share This Page