Skip to content

Instantly share code, notes, and snippets.

@crazyyy
Last active January 31, 2022 12:58
Show Gist options
  • Select an option

  • Save crazyyy/17f361709a1c78e45e0ab6725f8d02f0 to your computer and use it in GitHub Desktop.

Select an option

Save crazyyy/17f361709a1c78e45e0ab6725f8d02f0 to your computer and use it in GitHub Desktop.

Revisions

  1. crazyyy revised this gist Jan 31, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _readme.md
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@
    ## TODO

    - https://docs.litespeedtech.com/lscache/noplugin/settings/
    - https://docs.litespeedtech.com/lscache/devguide/advanced/

    ## links

  2. crazyyy revised this gist Jan 31, 2022. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions _readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    # .htaccess

    ## TODO

    - https://docs.litespeedtech.com/lscache/noplugin/settings/

    ## links

    - Best collection of code for your .htaccess file https://wordpress.stackexchange.com/questions/18968/best-collection-of-code-for-your-htaccess-file
  3. crazyyy revised this gist Jan 25, 2022. 1 changed file with 88 additions and 0 deletions.
    88 changes: 88 additions & 0 deletions _readme.md
    Original file line number Diff line number Diff line change
    @@ -3,3 +3,91 @@
    ## links

    - Best collection of code for your .htaccess file https://wordpress.stackexchange.com/questions/18968/best-collection-of-code-for-your-htaccess-file

    ## Disable Etags:

    ```ini
    Header unset ETag
    FileETag None
    ```

    ## Add expire headers:

    ```ini
    <FilesMatch "\.(ico|jpg|jpeg|png|gif|webp|js|css|swf)$">
    Header set Expires "Tue, 16 Jun 2020 20:00:00 GMT"
    </FilesMatch>
    # Or
    ExpiresActive On
    ExpiresByType text/html "access plus 1 day"
    ExpiresByType image/gif "access plus 10 years"
    ExpiresByType image/jpeg "access plus 10 years"
    ExpiresByType image/png "access plus 10 years"
    ExpiresByType text/css "access plus 10 years"
    ExpiresByType text/javascript "access plus 10 years"
    ExpiresByType application/x-javascript "access plus 10 years"
    ```

    ## Compress plain text file:

    ```ini
    <FilesMatch "\.(js|css|html|htm|php|xml)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    ```

    ## GZip compression

    ```ini
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    </IfModule>
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```

    ##

    ```ini
    ```
  4. crazyyy revised this gist Jan 25, 2022. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion _readme.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,5 @@
    ‎‎​
    # .htaccess

    ## links

    - Best collection of code for your .htaccess file https://wordpress.stackexchange.com/questions/18968/best-collection-of-code-for-your-htaccess-file
  5. crazyyy created this gist Jan 25, 2022.
    1 change: 1 addition & 0 deletions _readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​