I have signed up on infinityfree.net and uploaded my files online in the folder which said "upload yours files here".
Now there are two HTMLs present in the folder namely
Index2.html
chatbox.html
I want to link an chat box to an image in the index file I used all proper tags(I know because I tried https://www.google.com and it worked), but I'm just not able to do it.
Things I tried:
"https://www.domain-name.cf/chatbox.html"
"chatbox.html"
"/htdocs/chatbox.html"(htdocs is the name of the folder)
I also got the errors 404 and 403.
Please help.
I realized that infinityfree prevents accessing files which contains "chat" in their names , try to rename chatbox.html with another name who doesn't contain "chat" then it will work for sure .
If you are using PHP you can use the header("Location:path_to_your_file");
<img>...</img>
This should work for you.
Since both the files are in same folder you can directly write "chatbox.html".
Related
I have created a website using css, js and jquery, and everything works fine on my local machine, but after uploading it to the server, it was only reading the index.html file, leaving out the css and js. Below you can see the website's structure, after being uploaded to the server, on FileZilla.
enter image description here
I have decided to delete everything, re-check the paths and upload them again, but now all I get is a "403 Forbidden" message, saying that "You don't have permission to access / on this server."
Check file permissions of all the files.
Triple check file paths
/www/style.css
./www/style.css
^ Notice this dot
The above are two completely differnet paths. My guess is, that the second one is the correct one and should lead to style in your specific example
click here to see problem snapshot
this is the thing i want to hide from public, i tried everything on my server, my friend suggested me to use HotLink protection and it says it prevents other websites from directly linking to files (as specified below) on your website. Other sites will still be able to link to any file type that you don't specify below (ie. html files). i tried that but still it does not works.
i think i have to create .htacess file but i am not sure what should i type in that file so that my all website links are protected
You can also hide your files and folders from directory listing using directoryindex directive,
DirectoryIndex /file.html
/file.html is the file you want to show instead of the directory listing.
You're right you need to create a .htaccess file and copy the below code in it.
Options -Indexes
Hope this helps!
I am currently making a website, and have a folder containing CSS3 and HTML5 code in it. When I click on the index.html file, it opens up a local file and I can see my design and text in it. However, I am not sure how to have my website "point" to the index.html file, so it shows the content that is in the file. (I bought the domain with GoDaddy).
Thanks for the help!
Make Sure the directory does not have any other default files like default.php,default,html,etc and also there should be only one index file. if there is any index.php it will overtake index.html. Please make your question more clear and tell use which hosting are you using.....
Check documentation of the company that provides you hosting - the server has a list of files it looks for on disk in a given order. Only thing you need to do is to rename you file to match server's "lookup table".
Relevant part of configuration of the most popular web servers:
apache: https://httpd.apache.org/docs/current/mod/mod_dir.html
nginx: http://nginx.org/en/docs/http/ngx_http_index_module.html
I have researched this to death including on this page. My index page is outside my html folder and when I hit the nav link it will not take me back home(index page). I have seen a few post on here regarding this situation, see below:
There are also two special directory names: . and ..:
. means "current directory"
.. means "parent directory"
but I have tried several see below for examples that I have tried. The index page is on/in the root directory (folder), all the other nav links work as they are in the html folder and they are up one level.
I have tried:
Index
Index
Index
Index
Out of desperation I have tried several things I knew would not work, I would really appreciate your assistance in this matter.
littleone
In my opinion the safest way is using
index
This will move the user to the root directory no matter in which directory the user currently is.
It's quite short which can be helpful too. In most cases you can omit index.html because the server uses this file automatically if you visit a directory.
I'm no web server specialist, but I'm sure you're saving your index.html in the incorrect location.
Your /html folder is your ROOT folder, anything outside of it isn't accessible via a URL. I'm sure there are ways to override that, but I have never seen anyone do this even in the most complex projects I've worked in.
For example, your site www.yoursite.com is located in the /html of your server. So if you have your index.html file outside of that folder, that file can't be accessed or served at all.
The common sense solution is to move your index.html file to the /html folder. When you do this you can then use a slash in your href, like so:
Index
In some websites, I see links that look like this:
Link
The link doesn't go to an html file, but a folder (I believe). I was wondering if this has any purpose, and how to do this. Is there a default file to open when opening a directory? Because when I try something like this, I click the link, then I see a list of files in that folder, and I have to click on the proper link.
Everywhere I look, it says you should do links like this:
Link
Should I just let it go? I'm awfully curious.
This is something that is controlled by the web server. Some will look for a file called default.htm, others will look for index.html. It's usually configurable, and sometimes the server may look for any of a number of variations of index or default.
If such a file is not found, the server will often display a directory listing of all the files found in that folder, but usually that's not a good idea for security reasons. Again, this is something that can be controlled in the settings for the server.
Allowing directory listing is VERY dangerous and ill-advised practice. You should hide real directory structure of your site by all means.
PHPDL is a Php script that lists all the files in a directory (except itself of course). What sets PHPDL apart is that everything the script needs is in one file, including the file-type icons it uses.
Note: You can rename the script to anything you want. It will not list itself as a file to download.
This script safe and usefull, see demos:
http://greg-j.com/projects/phpdl/PHPDL-v2.php
http://greg-j.com/projects/phpdl/PHPDL-lite.php