My images won't load - html

I'm trying to make a gallery with several image tags like so:
My img folder looks like this: Although probably a simple fix, I just can't seem to make the connection. The console states: Any help would be great thanks!

You are receiving a 403 (Forbidden) HTTP status code, which - as its name implies - means that the server has denied access to you.
Make sure that, in the img folder there is no .htaccess file that is denying access (deny from among its contents).
Note the difference between this case, and the 404 (Not found) for the stylesheet.

Related

server not reading css and js files

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

How do I structure modx pages so they aren't all at the root URL, whilst being organised in a folder in the manager?

I'm developing my site in modx, and have some custom error pages that I want to group in a folder called "error", and I want them to only be accessible through domain.com/error/page.html. I've already placed the custom error pages in a container called error, which basically looks like the image below.
Only the pages are still only accessible from the root (so from domain.com/page.html), even though they are now in the "error" container. How do I change it so that when people see my error pages, they'll see the url: "domain.com/error/page.html"? Does anyone know how to do this?
p.s.: I've already figured out that I can influence the url of a page by typing the desired url in its "alias"-field. So an alias of "error/page" would mean it can be found at "domain.com/error/page.html".
But the weird thing is that this no longer works when I put the pages in an "error" folder. When I do that I can access the folder itself through domain.com/error, but no longer the pages in the folder at domain.com/error/page.html
Look in your system settings for the error page & access denied page, just set those to the IDs of the custom pages you have created. If you want custom pages for other error codes, you may have to use some redirect rules in an htaccess or apache config file. Some of them will probably never work [like 500 errors] in which case you would have to use a static html file & the server configuration to point to it.
as for setting the path - you will have to set your furls [more system settings] to "use friendly alias path'
also - clear your cache, with modx when in doubt clear the cache...

canvas.toDataURL() causing a security error

I'm using HTML5 canvas and the .toDataURL() function through KineticJS's .toDataURL() method. The canvas uses images that my users uploaded to the site, which are stored on a different machine and subdomain farm1.domain.com.
Problem: When .toDataURL() is called, I get the error
SECURITY_ERR: DOM Exception 18
Is there a way around this? I also get the same problem if the user access the page via domain.com and the image is hosted at www.domain.com.
Attempt:
I added the following lines to httpd.conf within virtualhost and restarted the apache service.
Header add Access-Control-Allow-Origin "http://www.domain.com"
Header add Access-Control-Allow-Origin "http://domain.com"
Header add Access-Control-Allow-Origin "http://farm1.domain.com"
I still get the same error when accessing image hosted on www.domain.com from page on domain.com! Is there a way around this in KineticJS?
You will need to add the Access-Control-Allow-Origin headers to the images you are loading, not to the page which is loading them. For details on this header, and on CORS in general, you may want to read "CORS isn't just for XHR", which specifically discusses this issue.
There is no way around this error. Images loaded in a canvas from a different domain will raise this error as currently implemented by every browser. In your case the images should be stored in the same domain and you would not be getting exceptions.

Why am i getting a 403 forbidden when using a img tag?

When trying to use
<img src="../Ginger.jpeg" />
I am getting a 403 error.
Here is the page which is requesting:
http://laponderosakennels.com/beagles/memories/ginger/index.html
What is going on here am I just tired?
if you look at http://laponderosakennels.com/beagles/memories/Ginger.jpeg it throws a 403 error.. there is a permission issue for the same.
The problem is probably cos you are referring to the wrong file.. i took the liberty of looking at your folder structure and you are referring to ginger.jpeg which has a permission issue and there is a file ginger.jpg that works fine.
Also make sure you refer to the file correctly.. i.e ginger.jpg
This can also be caused by using hotlinking protection. So if hotlinking protection is used, make sure that the URL for your website is added to the white list. Also keep in mind that www.yourdomain.com and yourdomain.com are considered two different URLs.
403 stands for permission denied. You need to check the permissions for "Ginger.jpeg".

Cannot find URL when duplicating site

So I have a booking system on my website with the URL domain.co.uk/booking. I wanted to add it to a different site I have, domain.com.au/booking. It is a simple drag and drop then run an install.php file. However my domain.com.au/booking does not find anything there. the files are there in the EXACT same way as they are in my domain.co.uk site which runs fine. Are there any reasons why the path would not be found that i may simply be over looking?
N.B the error that appears is
The requested URL /booking/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
If you are on a linux server, /booking/ does not equal /booking. That could explain the difference between the two sites (one is hosted on linux, the other is not).
Though this is just a wild guess.