In the redirection I have a lot of URL pointing to my old URL scheme… with /year/date/ like this : https://byothe.fr/2013/11/faire-le-tri-dans-ses-logicels-grace-a-should-i-remove-it/
I see that you can edit several link using a regex but I cannot figure how to create this expression… I tried different thing but without success…
Can anyone help me building this regex to find to have this URL :
https://byothe.fr/faire-le-tri-dans-ses-logicels-grace-a-should-i-remove-it/
Thanks
]]>domain.com/en/article1/
domain.com/fr/article3/
domain.com/es/article2/
I can’t seem to get all the links with language subdomains to return a 410 code. Please help me solve the problem.
]]>$map_content = '<script src="https://maps.google.com/maps/api/js?v=3&callback=mapLibReadyHandler&key=APIKEY" async defer></script>';
echo custom_replace_content_with_overlay( $map_content );
Following the Migration Guide at https://epiph.yt/en/embed-privacy/documentation/migration-to-version-1-10-0/ the function custom_replace_content_with_overlay
looks like this now:
function custom_replace_content_with_overlay($content) {
if (!class_exists('epiphyt\Embed_Privacy\data\Replacer')) {
return $content;
}
$wrapped_content = '<div class="embed-privacy google-maps">' . $content . '</div>';
$content = \epiphyt\Embed_Privacy\data\Replacer::replace_embeds($wrapped_content);
return $content;
}
I did create a custom embed provider in wp-admin via embed privacy settings called Google Maps.
In the updated documentation it is explicitly discouraged to use just the url as a Regex pattern like before, so I tried to use /<script\s+src="https:\/\/maps.google.com\/maps\/api\/js\?[^"]+".*?><\/script>/
which positively matches my tag in the regexr web tool.
But I was not able to get the overlay to show up this way. The script tag would always just be returned.
I did eventually get the overlay when I reverted back to the discouraged maps.google.com\/maps\/api\/js
and added the script tag to the allowed tags via the filter:
add_filter('embed_privacy_replacer_matcher_elements', function($allowed_tags, $provider) {
$allowed_tags[] = 'script';
return $allowed_tags;
}, 10, 2);
I’m sure there are good reasons not to generally include the script tag, so I’d still like to use the more precise Regex.
Any idea what am I missing here?
]]>I tried using regex to exclude all products under a woocommerce category like this: /product-category/(.*)
but started giving 404 error on all those product links when starting the warmer.
Am I using regex right ?
Thank you
]]>The sample url: https://mywebsite.com/pxpdflip_stream/204, (where 204 will vary)
The url redirection is defined in the htaccess as:
RewriteRule ^pxpdflip_stream/([^/]+)[/]?$ /wp-content/themes/mytheme/lib/FlipBook/1.0/lib/streamfile.php?ao=$1 [QSA,L]
So far, I have added an entry like this in the ‘Never minify the following pages’ section of ‘Performance > Minify > Advanced’ :
/pxpdflip_stream/.*
But it is not working. The page outputs a 500 error. Once the plugin is disabled, it works fine Can you please help?
PS: I want to exclude these pages from all types of caching.
]]>