• Resolved cullachie

    (@cullachie)


    It appears to flag up 404 alerts for old slugs ie pages/products that were removed a long time ago.
    Is there some way to suppress this behaviour or a way of finding and deleting the redundant slugs from the code?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Alexandru Tapuleasa

    (@talextech)

    If you are seeing 404s for old pages that existed but have been removed in the meantime it means something is still linking to them, either on your website or on different websites.

    You can set up a redirect for them to a new page or the homepage.

    In 301 Redirects PRO you can usually see the referrer/where the user clicked on that link and contact that website to get the link updated. This forum is only for the free version though so if you have any questions about PRO please contact us through the website.

    Thread Starter cullachie

    (@cullachie)

    Many thanks for the fast response

    Thread Starter cullachie

    (@cullachie)

    Hi,

    Since hosting roboto fonts locally, we are getting 404 alerts relating to product pages . Here is an example..

    www.trapbarn.com/product/fonts/roboto-v30-latin-regular.ttf

    All the Roboto-v30-latin-regularfont types are correctly in the fonts folder on the server and the CSS has been edited as follows..

    /* roboto-regular - latin */
    @font-face {
      font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
      font-family: 'Roboto';
      font-style: normal;
      font-weight: 400;
      src: url('../fonts/roboto-v30-latin-regular.eot'); /* IE9 Compat Modes */
      src: url('../fonts/roboto-v30-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
           url('../fonts/roboto-v30-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
           url('../fonts/roboto-v30-latin-regular.woff') format('woff'), /* Modern Browsers */
           url('../fonts/roboto-v30-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
           url('../fonts/roboto-v30-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
    }


    Can you comment please.




    Plugin Author Alexandru Tapuleasa

    (@talextech)

    You are putting that CSS on the page instead of a stylesheet and using relative paths ( ‘../fonts/roboto-v30-latin-regular.eot’ ) which means the browser will look for those fonts relative to the page URL instead of relative to the stylesheet. In the case of products page, for example https://www.trapbarn.com/product/fenn-spares/ the browser will go up one level in the path (../ means up one level) to https://www.trapbarn.com/product/ and try to load the font from https://www.trapbarn.com/product/fonts/roboto-v30-latin-regular.ttf which is not the correct location.

    So that is your issue, as for how you solve it, the easiest option, since you are adding the CSS directly to the page, is to just set absolute paths for the font files instead of ../font/. I’m not sure where the font files actually are but just write the full URL, for example https://www.trapbarn.com/[pathtofonts]/fonts/roboto-v30-latin-regular.ttf

    Thread Starter cullachie

    (@cullachie)

    I edited the CSS to put in the absolute path to the fonts as follows

    src: url('/public_html/wp-includes/fonts/roboto-v30-latin-regular.eot'); /* IE9 Compat Modes / src: url('/public_html/wp-includes/fonts/roboto-v30-latin-regular.eot?#iefix') format('embedded-opentype'), / IE6-IE8 / url('/public_html/wp-includes/fonts/roboto-v30-latin-regular.woff2') format('woff2'), / Super Modern Browsers / url('/public_html/wp-includes/fonts/roboto-v30-latin-regular.woff') format('woff'), / Modern Browsers / url('/public_html/wp-includes/fonts/roboto-v30-latin-regular.ttf') format('truetype'), / Safari, Android, iOS / url('/public_html/wp-includes/fonts/roboto-v30-latin-regular.svg#Roboto') format('svg'); / Legacy iOS */

    And the response was a 404 because it could not find …

    https://www.trapbarn.com/public_html/fonts/roboto-v30-latin-regular.ttf

    The above is the exact path to the font files.
    I tried it earlier with the full absolute path but, it came out with the domain name duplicated as follows:-

    https://www.trapbarn.com/www.trapbarn.com/public_html/fonts/roboto-v30-latin-regular.ttf

    Plugin Author Alexandru Tapuleasa

    (@talextech)

    Sorry, when I said absolute paths I was referring to the full URL not the file path on the server πŸ™

    Instead of /public_html/wp-includes/fonts/roboto-v30-latin-regular.eot you should use https://www.trapbarn.com/wp-includes/fonts/roboto-v30-latin-regular.eot in the CSS πŸ™‚

    Thread Starter cullachie

    (@cullachie)

    Sure, tried that but didn’t work.
    I’m putting this on hold for the time being as I have more pressing matters away from the site.

    Let me get back to you shortly.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘False alerts’ is closed to new replies.