.Htaccess file location

/ var / www / html / My_project_folder is the path to my project. I did not find the .htaccess file. I want to paste my edited .htaccess file. but I'm not sure where I need to put it? My htaccess file code is

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.php$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 <IfModule mod_expires.c>

 # Enable expirations
 ExpiresActive On

 # Default directive
 ExpiresDefault "access plus 1 month"

 # My favicon
 ExpiresByType image/x-icon "access plus 1 year"

 # Images
 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"

 # CSS
 ExpiresByType text/css "access 1 month"

 # Javascript
 ExpiresByType application/javascript "access plus 1 year"

 </IfModule>

 AddOutputFilterByType DEFLATE text/plain
 AddOutputFilterByType DEFLATE text/html
 AddOutputFilterByType DEFLATE text/xml
 AddOutputFilterByType DEFLATE text/css
 AddOutputFilterByType DEFLATE application/xml
 AddOutputFilterByType DEFLATE application/xhtml+xml
 AddOutputFilterByType DEFLATE application/rss+xml
 AddOutputFilterByType DEFLATE application/javascript
 AddOutputFilterByType DEFLATE application/x-javascript

I added this code to the .htaccess file to speed up my site. Please help me find the .htaccess file. Thanks at Advance!

+1
source share
2 answers

( index.php ). , . , - ".htaccess.txt", ( .txt ).

+1

.htaccess . , .htaccess ... , DM, .

nano.htaccess( linux)
.htaccess( Windows)

0

Source: https://habr.com/ru/post/1682549/


All Articles