+ 2

Background image doesnt show up. XAMPP error 404

HI everyone I want an image as background, but it doesnt show up. I am suing XAMPP. So, both css file and image file are in the same folder under htdocs folder. I checked the url path. it is correct. The file is also exist. but It said Failed to load the resources. Responed with a status 404 (not found) why? and how to solve this? thanks

22nd Nov 2016, 2:29 PM
Anita Putri
Anita Putri - avatar
8 Respostas
+ 3
Still not working I am curious about .htaccess as you said before. I read it controls for folder permission. maybe it is related to it. You asked me to show you .htaccess code. I found some of .htaccess. which one do you want? and which part? please help me..and thanks you very much
23rd Nov 2016, 3:05 PM
Anita Putri
Anita Putri - avatar
+ 2
Which url you use to embed your image file to your localhost. You have to use http://localhost/im/image_name.JPG also if you do that thing then try to open them in browser with this url. if They open clear cache of your browser. And open your localhost again. If it show you same thing. That must be cause by .htaccess and show your  .htaccess code here
22nd Nov 2016, 2:36 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
Both file are in the same foler. C:/xampp/htdocs/mywebsite/file.css C:/xampp/htdocs/mywebsite/image.jpeg css code just like this : body{ background-image: url(image.JPEG); } what is .htaccess and where I can find it? thanks
22nd Nov 2016, 3:04 PM
Anita Putri
Anita Putri - avatar
+ 2
You should use http://localhost/mywebsite/image.jpeg above url to open image file in browser. If it open use this url instead of just writing image.jpge This is wrong syntax C:/xampp/htdocs/mywebsite/image.jpeg on localhost.
22nd Nov 2016, 4:08 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
Does this below urls return 404 error. http://localhost/mywebsite/image.jpeg http://localhost/mywebsite/file.css if it show you an error than show your .htaccess code that is outside of your mywebsite folder.
23rd Nov 2016, 3:08 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 1
I just read about it. I should write or activate it. XD let me check it
22nd Nov 2016, 3:39 PM
Anita Putri
Anita Putri - avatar
+ 1
Problem is solved gentlemen. The cause is wrong ext of the image. It should jpg, not jpeg. Thank you everyone
23rd Nov 2016, 10:05 PM
Anita Putri
Anita Putri - avatar
0
Anita, check out my code labeled EP~Dare to compare it may help you with your question
23rd Nov 2016, 3:21 PM
Aquarius
Aquarius - avatar