Jump to content

Recommended Posts

Posted

I have problems with websites where logos are not displayed when the website is first called up.

Is there a difference whether a website is accessed with or without 'www.'? When I open a site via www. ... the logo is displayed, without only when the user clicks on a link on the page.

$config->httpHosts = array('mysite.com', 'www.mysite.com');

Does the order in which I place it matter?

The problem is that search engines find it different, sometimes with, sometimes without www … and the logo is missing.

The code of the svg logo

<img data-src="<?= urls()->templates ?>assets/images/logo.svg" uk-svg>

 

Posted

It's recommended to decide for one version (with or without www) and always redirect to the one and only.

In the default ProcessWire htaccess file, there are predefined rules to do that (remove # from the "Rewrite..." lines to enable the rules).

I don't think the order matters, but not sure on this one.

What happens when you access the full logo.svg URL without www?

 

Posted

@thausmann Hi, thanks for the answer.

It probably makes sense to remove the comment # of all three lines, 13A - 13C, right?

The logo is by uk-svg as a path in the code, the path is relative. It is displayed with or without www.

Posted

@kaz it depends what you want:

To redirect www to non-www, uncomment 13C (lines 332-333)
To redirect non-www to www, uncomment 13A (lines 320-323) OR (if that doesnt work) 13B (327-328)

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...