Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is .htaccess required? #2

Open
compumatter opened this issue Aug 18, 2021 · 0 comments
Open

Is .htaccess required? #2

compumatter opened this issue Aug 18, 2021 · 0 comments

Comments

@compumatter
Copy link

Hello,

My goal would be to store the font files locally to insure quicker load time.

I am unclear about the use of .htaccess and if it is required.

Can you tell me if this code is required in .htaccess in order for this class to work properly ?

<IfModule mod_deflate.c> <FilesMatch "\.(ico|jpg|jpeg|webp|png|gif|js|css|html|php|txt|xml|ttf|eot|otf|woff|json|woff2)$"> SetOutputFilter DEFLATE </FilesMatch> </IfModule> <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(ico|jpg|jpeg|webp|png|gif|html?|txt|css|js|php|pl|xml|ttf|eot|otf|woff|json|woff2)$ 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> <FilesMatch "\.(?i:gif|jpe?g|png|webp|ico|js|css|txt|ttf|eot|otf|woff|woff2|script)$"> FileETag None <IfModule mod_headers.c> Header set Cache-Control "max-age=864000, public, must-revalidate" Header unset ETag Header unset Last-Modified </IfModule> </FilesMatch> <FilesMatch "\.(json|js|txt|ttf|eot|woff|woff2|otf)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch> <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^index\.php$ - [L] RewriteRule ^index_2\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d </IfModule>

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant