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.

Bypass local user from Global .htaccess

Discussion in 'EasyApache' started by Rizwan Ghzzaal, Feb 18, 2016.

  1. Rizwan Ghzzaal

    Joined:
    Jul 22, 2015
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lahore
    cPanel Access Level:
    Root Administrator
    Is there a way that we bypass a local user from global .htaccess file. Actually we have enable caching on our server but some of the users want to check their site without any caching.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Which specific entry in the .htaccess file are you attempting to add? Have you tried adding the entry to see if it fails?

    Thank you.
     
  3. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    What type of caching mechanism are you using ?
    Is it nginx , php or other proxy ?
     
  4. Rizwan Ghzzaal

    Joined:
    Jul 22, 2015
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lahore
    cPanel Access Level:
    Root Administrator
    We are using php mechanism. Please find below code in our .htaccess file which is placed in our home partition:
    Code:
    # BEGIN Cache-Control Headers
    <ifModule mod_headers.c>
      <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "max-age=2592000, public"
      </filesMatch>
      <filesMatch "\.(css)$">
        Header set Cache-Control "max-age=604800, public"
      </filesMatch>
      <filesMatch "\.(js)$">
        Header set Cache-Control "max-age=216000, private"
      </filesMatch>
      <filesMatch "\.(x?html?|php)$">
        Header set Cache-Control "max-age=600, private, must-revalidate"
      </filesMatch>
    </ifModule>
    # END Cache-Control Headers
    
    <ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </ifModule>
    
    <ifModule mod_headers.c>
      Header unset ETag
    </ifModule>
    FileETag None
    
    <ifModule mod_headers.c>
      Header unset Last-Modified
    </ifModule>
    
    <ifModule mod_headers.c>
        Header set Connection keep-alive
    </ifModule>
    

    What if a user wants to bypass a certain domain?
    Best Regards,
    Rizwan.
     
  5. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page