Morning all,
I have an app deployed at www.mydomain.com/myAppp . I have created a virtual server and made myApp as the default web app.Hence anyone accessing www.myDomain.com gets redirected to www.myDomain.com/myApp. Now how do add a robots.txt file to my domain as google looks for www.domain.com/robots.txt.
The app is front ended by apache httpd.
Please let me know if you need more information.
Thanks,
Goutham
robots.txt should be under the ROOT directory for the application server. For tomcat its placed in
$CATALINA_HOME\webapps\ROOT
Not sure but putting in this folder will probably do "glassfish\domains\domain1\docroot"
or you can use Robots meta tag in your pages.
<!DOCTYPE html>
<html>
<h:head>
<meta name="robots" content="noindex,nofollow" />
</h:head>
<h:body></h:body>
Related
Hi Goodies i have an issue in pyscript
issue : when i paste the below pyscript code in my WordPress post as an html and press preview it just simply popups to dawnload the pyodide file instead of showing the hello world message in the code below. Please someone can clear that to me why this is happening.
thanks regards
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head>
<body>
<py-script> print('Now you can!') </py-script>|
</body>
</html>
the output screenshots from the browser where i get this happening.
(1) From WordPress
this is once i write the code in real time wordpress post as an html
this is what i got once i click on preview
(2) Samething is happening in vscode live server instead of the showing the message hello world it just popup my dawnloader idm to dawnload a pyodide file.
this is the code in vscode with the live server
this is what i got once i run with the live server in vscode
i need to run a small python code in my WordPress post when someone visit my website and in that post once he requests some calculation so the python code should be responsible to do some calculations and show that to the user.
any suggestions please
From the logo on the popup messages you're getting in both cases, it looks like this is behavior caused by having [https://www.internetdownloadmanager.com/](Internet Download Manager) (IDM) installed.
When the Pyodide runtime loads, it fetches certain additional files from the web, including pyodide_py.tar (the compressed Python API files the Pyodide Python API, as well as any additional packages specified in <py-config>. If IDM is configured to interrupt fetching these necessary files, Pyodide will fail to load and/or execute.
You may be able to whitelist (allow) IDM to automatically download these files, but that's beyond my knowledge of that particular plugin.
For more discussion, here's a similar issue on the PyScript GitHub.
Im using Strapi 3.6.8 and i came cross a problem i cant understand with loading the Admin panel.
the CMS status page is working perfect and the API is responding with no problem, but when i try to open the Admin panel i get blank page (white page) and in the page source ican see that there are two files that get 404 error (not found).
The files are: runtime-main.XXXXXXX.js, main.xxxxxxx.chunk.js.
The probplem is clear - the files path is wrong as you can see in the files source:
<!doctype html>
<html lang="en">
<head>
<!-- The first thing in any HTML file should be the charset -->
<meta charset="utf-8">
<!-- Make the page mobile compatible -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<title>Strapi Admin</title>
</head>
<body>
<!-- The app hooks into this div -->
<div id="app"></div>
<!-- A lot of magic happens in this file. HtmlWebpackPlugin automatically includes all assets (e.g. bundle.js, main.css) with the correct HTML tags, which is why they are missing in this HTML file. Don't add any assets here! (Check out webpackconfig.js if you want to know more) -->
<script type="text/javascript" src="/undefined/cms/undefined/admin/runtime~main.1727abc3.js"></script><script type="text/javascript" src="/undefined/cms/undefined/admin/main.be8fb29b.chunk.js"></script></body>
</html>
unforthantly, i wasn;t able to figure it by myself, i tried the following:
Checked ENV files
Cleared yarn/npm lock files and node-module folder (and reinstalled)
Update packages
Build and run locally using docker (instead of just runing the server locally)
none of the things i tried is working, im sure it's something really small and stupid to fix. it worked perfeclty until somepoint, but i cant findout what was changed.
Thanks.
We have an Asp .Net MVC website with Sitecore. The actual session value given in the web config is about 4 hrs. This is working fine in the PC. But the session instantly dies (about 1 or min) in iPhone and MAC.Any help will be appreciated.
It much looks Sitecore Robot detection mechanism sets session timeout to one minute based on your input.
To verify/disprove the assumption, you could temporary disable robot detection in Sitecore.Analytics.Tracking.config:
<setting name="Analytics.AutoDetectBots" value="true" />
In case experiment proves robot detection fault, do reach Sitecore Support.
I will not suggest you to permanently disable the bot detection settings as it is kind of recommended in sitecore projects but alternatively what you can do, put #Html.Sitecore().VisitorIdentification() in the<head><head> section of the main layout.
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
<meta charset="utf-8" />
#Html.Sitecore().VisitorIdentification()
</head>
<body>
</body>
</html>
I have hosted a simple singlepage HTML/CSS website on github. I wanted to redirect incorrect subpages (ie mysite.com/m) to redirect to the homepage (mysite.com) as the default route. Can this be achieved on a static site on github?
You can create a /m/index.html file containing :
<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href="/index.html">
<meta http-equiv=refresh content="0; url=/index.html">
<h1>Redirecting...</h1>
Click here if you are not redirected.
<script>location='/index.html'</script>
I am working on a project that the client only allows their employers to look at intranet site. Therefore, in my project IE11 defaults to compatibility mode for intranet sites. Meta tag <meta http-equiv="X-UA-Compatible" content="IE=edge"> gets overwritten. How do we set the content="IE=edge" even on intranet sites?
After searching for an answer, my co-worker helped solved this problem in Ruby. I research why IE11 was ignoring:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
The setting for IE=Edge has to render on the response header. This post Force IE compatibility mode off using tags helped lead to an answer.
In your project find your controller that sets up your headers. In our project it is application_controller.rb.
Add:
before_filter :set_default_headers
def set_default_headers
response.headers["X-UA-Compatible"] = "IE=edge"
end
This will allow IE11 to view the page in Edge even when the site is rendering for intranet view.