kaz Posted Wednesday at 02:45 PM Share Posted Wednesday at 02:45 PM 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> Link to comment Share on other sites More sharing options...
thausmann Posted Wednesday at 02:50 PM Share Posted Wednesday at 02:50 PM 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? Link to comment Share on other sites More sharing options...
kaz Posted Wednesday at 04:01 PM Author Share Posted Wednesday at 04:01 PM @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. Link to comment Share on other sites More sharing options...
thausmann Posted Wednesday at 04:39 PM Share Posted Wednesday at 04:39 PM @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) 1 Link to comment Share on other sites More sharing options...
kaz Posted Wednesday at 05:13 PM Author Share Posted Wednesday at 05:13 PM @thausmann then 13A (line 320-323) is the right one for me. I have just done it, it works fine! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now