NGINX
Serve all assets:
location ~ ^(/wp-content/themes|/wp-content/uploads)/.*\.(jpe?g|gif|css|png|js|ico|pdf|m4a|mov|mp3|webm|mp4)$ {
rewrite ^ https://mydomain.com$request_uri?
permanent;
access_log off;
}
NGINX
Serve all assets:
location ~ ^(/wp-content/themes|/wp-content/uploads)/.*\.(jpe?g|gif|css|png|js|ico|pdf|m4a|mov|mp3|webm|mp4)$ {
rewrite ^ https://mydomain.com$request_uri?
permanent;
access_log off;
}
//Allow svg | |
function cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
/*Change url page to stran*/ | |
if ( ! function_exists( 'lr_page_to_seite' ) ) | |
{ | |
register_activation_hook( __FILE__ , 'lr_flush_rewrite_on_init' ); | |
register_deactivation_hook( __FILE__ , 'lr_flush_rewrite_on_init' ); | |
add_action( 'init', 'lr_page_to_seite' ); | |
function lr_page_to_seite() | |
{ | |
$GLOBALS['wp_rewrite']->pagination_base = 'stran'; |