|
Hello, Gezzz. . . I thought I followed the steps correctly to enable .htaccess, but it's not enabling (I test it on Google PageSpeed Insights and also by uploading a changed jpg image). If anyone has any ideas to share, it sure would be appreciated. Here are the steps I took:
1.) My .htaccess file has only the below content and is located in my document root directory with all of my website content:
## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ##
2.) I disabled the apache default config file and have my own that handles my website content. In my sites-available config file located at /etc/apache2/sites-available/myvirtualhost.conf I inserted my document root location after AccessFileName and in the <Directory> tag, and I changed AllowOveride None to Override All below here:
* * * # .htaccess file location AccessFileName /documentRootDirectory/.htaccess
<Directory /documentRootDirectory/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> * * *
3.) And in my apache config file etc/apache2/apache2.conf I made no changes: * * * AccessFileName .htaccess
<Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files>
* * *
Thank you in advance for any suggestions.
--Eric
|