opencart favicons not showing up, if redirected the admin cannot log in - redirect

as suggested in the title, the site is working properly, but if i access it with the www. the favicons are not showing up, if i access the site without the www. the favicons show up fine. I tried redirecting all the users to the site without the www. with the help of the .httaccess file, but then the admin can't log in, the admin works only throught the www.site. I tried to change the config.php file, but with no luck

I fixed it myself eventually.
needed to put this line inside the .htaccess file:
Header set Access-Control-Allow-Origin "*"
Hope this helps someone.

Replace the favicon icon link in head of the html pages of your site with the following. Also the path of icon file should start with www -
<link rel="icon" href="your_path_to_icon_file" type="image/x-icon">

Related

How to skip the welcome page and start Strapi right from /admin (login) page?

I've successfully deployed a Strapi app to a VPS (Ubuntu, nginx, etc.) and it works fine. What I want to do now is to redirect a user right to the /admin page. I mean now, after entering https://strapi.my-domain.com in a browser's address panel, user gets the standard welcome page like so:
welcome page
But I want a user to see Strapi's /admin page right after he/she entered https://strapi.my-domain.com in a browser's address panel. Could someone please give any advice how to do that?
I was exploring strapi v4 document for similar problem and found this solution.
Redirecting landing page to admin panel
If you do not wish to have the default landing page mounted on / you can create a custom ./public/index.html using the sample code below to automatically redirect to your admin panel.
✋ CAUTION
This sample configuration expects that the admin panel is accessible on /admin. If you used one of the above configurations to change this to /dashboard you will also need to adjust this sample configuration.
Path — ./public/index.html
<html>
<head>
<meta http-equiv="refresh" content="0;URL='/admin'" />
</head>
</html>
Source: Strapi v4 Document

\Favicon.ico error in Jboss 7.1.1

I want to access my application without context root in JBoss 7.1.1
I have renamed application as ROOT.war and deployed it and
updated stadalone.xml
from
to
Am able to access the login page of my application, but moment I enter credentials and login I get "HTTP Status 404 - /favicon.ico".
I don't know where am going wrong. once i remove /favicon from URL and reload it, everything works normal. Please help me to resolve this problem.
Favicon stands for "Favorites Icon". It's the little icon beside your site's name in the favorites list, before the URL in the address bar and bookmarks folder and as a bookmarked website on the desktop in some operating systems.
The Favicon.ico shows as 404 means is that people with browsers that use favicon (Internet Explorer 5.0 +, Firefox, Opera and a most others) are visiting your site.
While seeing a 404 in your log files usually means that a visitor got the dreaded "404 Page Not Found" error, in this case it doesn't. All it means is that the default icon was shown instead of a custom one.
To get your Favicon to show there are 2 different ways to do this:
This is the easiest to do and it will show your icon no matter what page your visitor adds to their favorites. Simply upload your new icon to the main directory of your site, ie. www.example.com/favicon.ico
If you don't have access to your root directory (if your on a free server for example) or it you want a different favicon for certain pages, add this to the <head> of your html. (You can name your favicon whatever you'd like with this method)
<link rel="shortcut icon" href="/folder-name/logo.ico">
Or if you prefer to use the full URL:
<link rel="shortcut icon" href="http://example.com/favicon.ico">
Note:
If you upload a new Favicon, be sure to clear your cache for the new icon to show up.

Facebook Page Tab external URL

What should contain a HTML file to display it on a Facebook Page's Tab. I have added the tab, but I get blank page, I have tried everything, searched hours, my URL is HTTPS, so I really don't know...
Could you paste anybody a full HTML code that works, appears in a Page's Tab with an app? Thanks!
That would be the minimum, it definitely works:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
hello there
</body>
</html>
As you can see, nothing fancy there. Without any test URL, we can only tell you to open the browser console and search for errors.
We found the answer, the server doesn't enable the iframing, so what I tried was good, but
Console's JavaScript error: Load denied by X-Frame-Options: https://www.... does not permit cross-origin framing.
So we contacted to our hosting company to solve this.
UPDATE: Hosting support added the following code to my .htaccess file: Header always unset X-Frame-Options, what solved my problem.

How to show favicon in subdomain xml file

I have a subdomain feeds.domain.com, The root Directory for this subdomain is in main domain(/public_html/feeds/), I
I have placed favicon in root(/public_html/) and subdomain root(/public_html/feeds/) directory.
Now favicon is not displayed in browser for xml files that are in subdomain, xml files in other directory are showing favicon though.
Why browser is not picking favicon for xml from subdomain.
Example url where favicon not showing is feeds.domain.com/all/index.xml
Example url where favicon showing is www.domain.com/feeds/all/index.xml, (this is sub domain directory showing favicon when accessed directly from domain)
If I enter url feeds.domain.com/favicon.ico browser displays favicon.
Please see and suggest any possible way to do this.
Thanks.
I got it solved, I deleted all browser history and cleared browser cache now it is showing favicon, I hope this helps others too with same issue.
Thanks.

Redirecting users to the facebook app

If I have an app on facebook that's pulling the content from http://example.com for instance, is there a way I can stop people visting the example.com site and instead redirect them to the facebook app page?
Facebook is sending a POST variable called signed_request when the page is opened within a Fan Page Tab or the Canvas page of your App. Simply check if the POST variable is there and redirect to your App's Canvas page if not ;-)
Here you can read a bit how the signed_request is used inside an App.
Kalvin is close. Props to Kalvin :)
Setup your website to default to index.html
Move the real content of your site from index.html to index-fb.html
In index.html then place either the meta tag for redirection or just javascript for location.href='' script for redirection. The url to redirect to will be in the https://apps.facebook.com/{yourappname} format.
In facebook, update the app settings canvas app url from http://example.com to http://example.com/index-fb.html
1) Pull your content from your website from a subfolder
2) Redirect them from the index.html using a meta tag:
http://www.web-source.net/html_redirect.htm
A better way would be to check if the content is being displayed inside facebook and then redirect but I have no idea how to do that
Edit the .htaccess or conf.d file on your Apache web server (or the rewrite rules in IIS) to give a 301 Permenant Redirect.
Assuming you have Apache:
1.) Log into the box using ssh or some terminal emmulation program
2.) cd /etc/httpd/conf.d
3.) Locate the the configuration file for your site, edit it using vi, emacs, nano, or some text editor
4.) See here on how to write the rewrite rule.