• Resolved ceslad

    (@ceslad)


    Hi.
    I noticed that autoptimize has a HTACCESS file created.
    It turns out that WordPress also has a HTACCESS (where I’ve put rules to take advantage of the browser cache).
    Can there be two HTACCESS files inside the hosting?

    Thanks

    • This topic was modified 6 years, 2 months ago by ceslad.
    • This topic was modified 6 years, 2 months ago by ceslad.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Can there be two HTACCESS files inside the hosting?

    yes, apache will check each directory for a .htaccess and will apply rules found in one to that directory and child directories.

    hope this clarifies,
    frank

    Thread Starter ceslad

    (@ceslad)

    Can I remove the codes that are in the <HTACCESS> of the AUTOPTIMIZE and put them in the <HTACCESS> of the WORDPRESS?

    Another question:

    Inside the WORDPRESS <HTACCESS>, I already have a code that I put with rules to take advantage of the browser cache. I mean, in autopmitize there’s a <HTACCESS> with cache codes, and in WORDPRESS there are also cache codes.
    What do you think? Can I have a problem?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Can I remove the codes that are in the <HTACCESS> of the AUTOPTIMIZE and put them in the <HTACCESS> of the WORDPRESS?

    you can, but AO will re-write them every time you clear the cache. you could however create an (empty) ao htaccess template-file wp-content/AO_htaccess_tmpl in which case AO will use that one.

    Inside the WORDPRESS <HTACCESS>, I already have a code that I put with rules to take advantage of the browser cache. I mean, in autopmitize there’s a <HTACCESS> with cache codes, and in WORDPRESS there are also cache codes.
    What do you think? Can I have a problem?

    depends on what is in your own .htaccess, but problems would be unlikely 🙂

    have a nice weekend,
    frank

    Thread Starter ceslad

    (@ceslad)

    this is the code that is in wordpress htaccess:

    #BEGIN cache
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault “access plus 1 month”
    ExpiresByType image/webp “access plus 1 month”
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    ExpiresByType image/ico “access plus 3 month”
    ExpiresByType image/svg+xml “access plus 1 month”
    ExpiresByType text/css “access plus 1 month”
    ExpiresByType text/javascript “access plus 1 month”
    ExpiresByType text/html “access plus 1 month”
    ExpiresByType application/javascript “access plus 1 month”
    ExpiresByType application/x-javascript “access plus 1 month”
    </IfModule>
    #END cache

    I did not understand. You tell me to create a folder inside <wp-content>? What name would I give to this folder? Can I put it in place of the <Cache> folder? Would it be this?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    this is the code that is in wordpress htaccess:

    don’t see any obvious issues there.

    I did not understand. You tell me to create a folder inside <wp-content>? What name would I give to this folder? Can I put it in place of the <Cache> folder? Would it be this?

    No, my point is you can create a file called AO_htaccess_tmpl in wp-content. if it is there AO will use the contents of that file for it’s own .htaccess.

    frank

    I have a similar issue. My htaccess includes Expires headers, gzip and deflate commands. Do ANY of these serve an useful purpose if i’m using AO? If not, do I just delete them?

    (Excellent plugin, by the way!)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Do ANY of these serve an useful purpose if i’m using AO?

    they do, actually, for all non-AO’ed resources, so I would leave them be 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HTACCESS Autoptimize’ is closed to new replies.