Merhaba,
functions.php ile ana dizinde ki .htaccess'e kod ekleme şansım var mı ?
Eklemek istediğim kodlar ;
## 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 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 2 days"
</IfModule>
## EXPIRES CACHING ##
Wordpress'in codex sayfasında ;
https://codex.wordpress.org/User:Ame...ess_Indirectly
Şu kodları buldum.
/**
* Get .htaccess contents before being written to file
*
* Uncomment the first two lines and to go Settings > Permalinks to see the output.
*/
function my_htaccess_contents( $rules )
{
// echo '<pre>'. $rules .'</pre>';
// exit();
return $rules . "# My little addition!\n";
}
add_filter('mod_rewrite_rules', 'my_htaccess_contents');Ancak çalışmadı.