Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Bypass local user from Global .htaccess

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

  1. Rizwan Ghzzaal

    Joined:
    Jul 22, 2015
    Messages:
    21
    Likes Received:
    2
    Trophy Points:
    3
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,827
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    262
    Likes Received:
    6
    Trophy Points:
    168
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    What type of caching mechanism are you using ?
    Is it nginx , php or other proxy ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Rizwan Ghzzaal

    Joined:
    Jul 22, 2015
    Messages:
    21
    Likes Received:
    2
    Trophy Points:
    3
    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:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice