XAMPP Images Not Showing/Broken (- Possibly .htaccess) - windows

I am hosting a website on the localhost of a VPS using XAMPP.
When I go to the website be it on the VPS directly through localhost or remotely from my own computer - images are not loading and appearing as broken and when I try to view the image directly I am given an error 404 and object not found.
The image paths are completely correct in corresponding to htdocs.
For example,
http://mysite.com/icons/pixels.gif
I copied that link, checked htdocs and that is exactly where the image should be yet I am given an error 404 and object not found.
HOWEVER.
Out of chance I changed the \icons\ from an 'i' to a capital and the image loaded normally. The icons folder in htdocs does not have a capital letter.
The problem may be my .htaccess file though, here is a link to it: http://pastebin.com/vUnhjb2A

Related

Vue.js dist folder when copied to Shared hosting site's subfolder is not rendering and showing a blank page

After successfully running npm run build I copied the contents of the /dist folder in my local wwwroot folder. Everything renders correctly and I an see my page.
The problem comes when I copy the same contents of the /dist folder to a sub-directory on a Shared Hosting site (Domain.com or GoDaddy.com): https://www.mywebsite.com/sub-directory
All I see is a blank page. Upon checking the Network tab in developer tools, I see all requests status come back with 200 Status Code.
At this point I have thrown the towel and would appreciate any help I can get.
I went around my problem and solved it in another fashion. Instead of making a subfolder in /public_html folder, I created a subdomain using the configuration menu. Therefore my site looked like: https://mysubdomain.myoriginalsite.com
While creating a subdomain, the shared-hosting site's configuration asks me what should be the folder for this newly requested subdomain.
So I created a folder in the root (same level as /public_html) called /mysubdomain and copied all my files from /dist folder over there.
It worked like a charm.
Please NOTE: In vue.config.js file I updated my publicPath variable to be '' instead of '/'

images not appearing online but appears offline. I am uploading via Filezilla

I am uploading my website using Filezilla, and some images are not appearing. I have checked that the file names are all lower case and that the file type is set to auto instead of ASCII. I have cleared the cache too and I am still not seeing the same images not appearing.
I have got a 403 and 404 error on these images in the console, please see screenshot image for this.error image
All images work fine when testing locally on my computer but some random images are not appearing. Anyone any ideas why this could be?
Thanks!
image not appearing
Could you maybe provide some code with examples?
It could e.g be that the path on the server is different. If you use absolute paths it may work on your host where the homepage is under /. But if it is under /user/ or something similar (so not in the root), the paths can be broken and images will not appear. So check if you provide the paths differently for the pictures that work as opposed to the ones which fail.

images won't display after hosting website on a server

Help!
I made a website with downloaded images inside the directory, in an img folder. I am certain that the images are pointed right, because when I work locally, it displays just fine. All I did when uploading to the server was copy and paste the entire project folder over, and I know that none of the files got jumbled up, I inspected and checked. Now when I go on the server, many of the images won't display. I am certain they're pointed right! Locally they work fine.
I'm stumped, even other images on other pages of the site work fine, and they use the same method of the src coming from a saved image from a filepath...
I'm using cyberduck if that helps, I don't know what to do and the project is due tomorrow.
Checking the console gives me 404
"Failed to load resource: the server responded with a status of 404 (Not Found)
http://sites.westmec-coding.org/~eciudad/ProjectPortfolio/startbootstrap-stylish-portfolio-gh-pages/img/StPatricksDay.png Failed to load resource: the server responded with a status of 404 (Not Found)"
But I literally see the image folder in there with it on the cyberduck GUI
I solved the problem.
Somehow, all the .png's became capitalized to PNG when moved to the server.
I went back in and renamed it to lower case png, capitalization can effect things drastically. The console works miracles.

After successful installation, xampp redirects to localhost/xampp

I have followed Drupal's tutorial on how to successfully run a Windows server using xampp. I think I've done everything right, but when I go to my website, it goes to mywebsite/xampp.
Does anyone know what I need to do to solve this?
Which folder did you put your website files? What address did you type in the address bar? If using localhost or any other domain which redirects there, be sure you rename any index.php or index.html in the server root folder (htdocs). This is because most servers look for any file named this way when visiting any server folder and will automatically display that page when it finds it.
In this case since you freshly installed xampp, their homepage is probably set to show by default
For example look at the picture. This is the index.php file in the htdocs folder. At the top you can see I've added a header to redirect to somewhere else. Below I commented out the code that was defaulted by the xampp installation, which pretty much said to relocate to the xampp/ directory (which then loads the index file there). If it failed to go there, you should see the message at the bottom
Something is wrong with your xampp installation :-(
If you're being redirected to the xampp/ directory you simply need to rename or edit the index.php file in the htdocs folder.
Ideally you should make a separate folder for your website in the htdocs folder, something like htdocs/myWebsite.
You can name your homepage either index.html or index.php (depending on which language you use) and then go to localhost/myWebsite and it will automatically load your homepage.

I want to display the image from xampp folder?

Working with PHP. I want to display the images which are in xampp folder not in htdocs (which will be root of the website). How to go about it? I have tried <img src="../../image.jpg", and also tried with src=/image.jpg, not working. Given the total path as src="E:/xampp/image.jpg" still not working. What may be wrong. The file is .php
You can't access pictures (or files) outside of htdocs on a webpage.
There are probably ways to retrieve the image from a directory "lower" than htdocs with PHP (depending on your open_basedir-restrictions), store them somewhere else and let the img-tag display them or really mess with your server settings to allow access ... but why don't you just place the images somewhere in htdocs (or a subdirectory), where they belong?
You cant access images/css sheets etc outside htdocs folder
Make a folder for images in htdocs and use those

Resources