There is a directory of PDF files that has been indexed by Google and that should be private. As I already fixed this by creating robots.txt and directory listing, some time will have to pass until Google removes the links.
Can I block access to those files using htaccess if a visitor is coming from Google?
Related
My site is under security audit to get the security certification. After audit they gave me two security issues to look at.
Stored Cross Site Scripting: The application must implement server side validation for all user-entered inputs. Only expected values should be accepted. Script tags should be rejected. All user inputs should be sanitized.
Malicious File Upload
I have added the at filter tags in Joomla global configuration text filters. And also though I have clearly stated for all file upload elements to only use .jpg,.jpeg,.png extensions, I can still upload .php extension files.
How can we rectify these two issues?
Regards
Use the defines.php file to clean the POST data before it reaches the Joomla site, and block any request with $_FILES in it.
If your website needs to allow users to upload files, then make sure that these files only consist of specific file types, and, if you don't need the external world to have access to these files, then block access to these files (in the folder you have them uploaded to) using an htaccess rule.
I have added robots.txt file and added some lines to restrict some folders.Also i added restriction from all to access that robots.txt file using .htaccess file.Can Search engines read content of that file?
This file should be freely readable. Search engine are like visitors on your website. If a visitor can't see this file, then the search engine will not be able to see it either.
There's absolutely no reason to try to hide this file.
Web crawlers need to be able to HTTP GET your robots.txt, or they will be unable to parse the file and respect your configuration.
The answer is no! But the simplest and safest too, is still to try:
https://support.google.com/webmasters/answer/6062598?hl=en
The robots.txt Tester tool shows you whether your robots.txt file
blocks Google web crawlers from specific URLs on your site. For
example, you can use this tool to test whether the Googlebot-Image
crawler can crawl the URL of an image you wish to block from Google
Image Search.
I am creating a website for one of my client. consider this is my website: www.website.com
I saved my all my files in sub-domain like-> http://sub.website.com/file.jpg
I also have robots.txt file in sub-domain like-> http://sub.website.com/robots.txt.
If someone directly enter this url "http://sub.website.com/robots.txt", They can able to read my robots.txt file.
What should i do, if i want protect that files?
If you make your robots.txt file "un-readable" than search engines won't be able to view it to know what not to index.
I have a sitemap file called links.txt, and I want only search engine/bots to access this file.
How can I do that via htaccess file.
is it possible to redirect a link to a pdf file?
This is my site: www.mysite.com
And I createad a redirect link that if I open www.mysite.com/documentation - an index.html file will open but for now this index.html file says it's under construction.
Can I redirect the link to a pdf file?
I uploaded the pdf file into the server. So that if I open www.mysite.com/documentation, my pdf named as thedocument.pdf will open.
Is it possible?
If your web hosting provider won't allow you alter the default extensions (i.e. to add pdf) then you could create a HTML page to act as the landing page and then redirect to the PDF.
Details here: http://www.web-source.net/html_redirect.htm
Yes, this is possible. Check your web server configuration that currently points /documentation to index.html, and change it to point to thedocument.pdf.
Be aware that the PDF may or may not load in the user's browser. Some configurations will prompt the user to download the file.
You can achieve this with a modX Weblink.
Upload your pdf to a place from where it is publicly downloadable. For this example I will upload it to modx/assets/content/test.pdf. You should now be able to download your file from http://yourdomain.tld/assets/content/test.pdf.
Create a new weblink resource in modX (Site -> New Weblink) on the base level of your resource-tree. Make it a container and type in 'documentation' as the alias of your resource. You should also make sure, that you already use friendly urls, but your question sounds like you're already doing this.
A weblink has a field to enter the 'weblink' instead of the ressource content. Just use the URL from which you are already able to download your pdf-file. In this example, this would be http://yourdomain.tld/assets/content/test.pdf.
If you now view the newly created weblink resource under http://yourdomain.tld/documentation, you should instantly download a copy of your file test.pdf.