Você está na idade da pedra

Parece que você está navegando em um iStone, pois o seu navegador não suporta javascript ou o seu javascript está desativado. Por favor, ative o javascript e recarregue a página.

Server caching .htaccess file? Here’s how to solve it – Lucre Bem
Cotação do mercado de criptoativos nas últimas 24 horas. Visualizar todos os criptoativos disponíveisTemos um presentão pra você, descubra.
  • Português
  • English
  • Aqui você se promove e ainda pode ganhar dinheiro.
    Saiba +

    Server caching .htaccess file? Here’s how to solve it


    I had a problem with the site’s htaccess file yesterday, what happened was that the 301 redirects were not working. Inside my htaccess file I have many 301 redirects that worked just fine for a long time, but yesterday I tried to add new entries and they didn’t work. When I checked it closely, I noticed that the server doesn’t seem to be using the version that I’m saving. It looks like the server is using another file, because I already cleared my browser cache, I tried another browser, I cleared my website cache and I even restarted the server, still the same problem. I’m using a VPS with CentOS and DirectAdmin.

    This is tutorial is for whoever is using this method to redirect the URLS:
    Redirect 301 /category1/post /category2/post

    I did that, but the server wasn’t loading the modified file. I didn’t have any caching plugin enabled, I also disabled all my site’s plugins, still the very same problem.

    Yes, mod_rewrite is working, like I said, the redirects that I created before are working, it’s just that now it seemed like the server was caching an old file. I tried to search about it and I couldn’t find a solution anywhere, I even contacted my host and they didn’t solve it.

    So today I had another talk with my host and they solved it, how?

    Like this:

    Currently OpenLiteSpeed reads .htaccess on starting time, so, if some new .htaccess files are created, or current ones modified – changes are not in effect until the reload of OpenLiteSpeed service. Please note that DirectAdmin provides customers an ability to reload OpenLiteSpeed directly from the user level, and does this automatically for the .htaccess files edited in File Manager. It’s also reloaded automatically when uploaded using FTP if pureftpd_uploadscan option is used in CustomBuild. However, if you would like to have a cronjob setup, which would reload OpenLiteSpeed every X minutes if there are newer .htaccess files that the starting time of OpenLiteSpeed, you may use a cronjob like (*/3 means every 3 minutes, you may change it to happen less/more often):

    */3 * * * * root if ! find /home/*/domains/*/*_html/ -maxdepth 2 -type f -newer /usr/local/lsws/cgid -name '.htaccess' -exec false {} +; then /usr/local/lsws/bin/lswsctrl restart; fi

    Cronjob can be created as /etc/cron.d/openlitespeed_htaccess_scan. It scans for .htaccess files in public/private_html folders, with a max depth of 2 folders (it can be changed to 3, or unlimited at all, however, it could slow the scanning down).

    So that’s pretty much it, just a caching problem with Litespeed.
    Fonte: https://help.directadmin.com/item.php?id=2097

    How useful was this post?

    Click on a star to rate it!

    Average rating 0 / 5. Vote count: 0

    No votes so far! Be the first to rate this post.

    E que tal deixar de comer um pastel só por hoje

    e doar o dinheiro para os colaboradores? Vamos lá, eles merecem. 😎

    Pessoas que tornaram esse conteúdo possível:

    Você também poderá se interessar por:

    Essa postagem não tem nenhuma postagem relacionada.


      Leave a Reply

      XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

      DMCA.com Protection Status

      Bloqueador de anúncios detectado / Adblocker detected


      🇧🇷 Anúncios são a nossa principal fonte de renda.
      Por favor, adicione o nosso site à lista de exceções do seu bloqueador de anúncios, caso queira visualizar o conteúdo. Prometemos não te incomodar com anúncios popups invasivos. Alguns navegadores, como o Brave, utilizam um bloqueador de anúncios nativo, então pode ser necessário que você abra dois bloqueadores para adicionar o nosso site às listas de exceções.

      🇺🇸 Ads are our main source of income. Please add our website to your ad blocker whitelist, if you want to see the content. We promise not to display invasive pop-up ads.
      Have in mind that some browsers, such as Brave, use native ad blockers, so you may need to open both blockers to whitelist our website.