Image not loading in page on WAMP localhost 403 forbidden error, but clicking its link works - image

I have the following code in my localhost project in WAMP
<img src="/imgs/quickstartVideo.jpg" width="357" height="200" alt="quick start video">
The image won't appear - console says "403 (forbidden)". However, if I right click to view the page source, and click the image's link, the image appears.
The page loads js and css files that are using the same sort of relative URL.
Why does it tell me it's forbidden, yet lets me load it when I click it? How do I get it to just load please?
My dir structure is:
c:\wamp
c:\wamp\www
c:\wamp\www\imgs
c:\wamp\www\js (js files are loading fine)
UPDATE: it's displaying correctly in MS Edge, but not Chrome.
Thank you

Solved -the issue was an IfModule mod_rewrite I'd set up in htaccess to stop image hotlinking on my production domain. Commented it out for localhost development, and, funny enough, my images are working again.

Related

Change document root of Laravel

When I place a Laravel project into Apache's document root, say /var/www/html, it works when I point a browser at it.
However if I put it under a directory under Apache's document root, for example /var/www/html/myProject, it doesn't work when I point a browser at it.
Is there anyway I can change this behavior?
Thank you very much.
Edit:
When I put the Laravel project off a sub-directory off /var/www/html, Laravel complained that it could not write to the file laravel.log. After checking and changing the group ownership of the sub-directory, the index page came up normally.
However, the background image was missing, even after I changed the URI in the CSS stylesheet.
Furthermore, when I clicked on any link from the index page, I got a 404 Not Found Error. This is an Apache 404 and not a Laravel 404, which is styled differently.
OTOH, if I run the PHP server off this sub-directory and point my browser at localhost:8000, the links serve up pages correctly.
Thank you for your help.

Quasar / Vue.js Image in header not showing

Im really new to Vue.js and Quasar and am currently trying to build just a basic application.
In there i have a header which should display a logo on the top left using the following code in my MainLayout.Vue.
<q-layout view="hHh LpR fFf">
<q-header elevated class="bg-accent text-white">
<q-toolbar>
<q-toolbar-title>
<q-img src= "public/icons/favicon-16x16.png" style="width: 70px;">
</q-img>
Title
</q-toolbar-title>
</q-toolbar>
</q-header>
<q-page-container>
<router-view />
</q-page-container>
</q-layout>
It runs without an error, but the image is not displayed. At its position there is just a blank space. When i open up the JavaScript Console in my Browser,
Failed to load resource: the server responded with a status of 404 (Not Found)
The path is definitely right. Placing the image inside of the src/assets folder did not help as well.
I followed this tutorial, which lead me to the point im at now.
The only difference i can see is that the project in the tutorial uses the "static" folder for its image, however my project does not contain such "static" folder.
Googling i found that the "static" folder got turned into the "public" folder through some update.
But since i'm using the public folder for my code above, this seemingly either is not true or the issue is something else.
So how do i get my logo to be displayed top left in my header?

I installed a ssl after that the image slider not working

Hello after installing a ssl on my site the image slider has stopped working.
The site isnt woedpress its just a php site thats quite old.
I installed the ssl through namecheaps cpannel & turned the redirect http to https on.
https://www.compare-travel-deals.com/ - my site
http://www.travelsite2.epizy.com/ - how it shold look
I've gone through changing any links i find to http: to https:
Viewing the source i thort it was somthing to do with this line "" but can work out where the link is to change http to https.
Hopefully someone knows.
Nevermind i scanned through the index.php and found the link to the http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js file and changed it to https. And it works now, thanks anyway.
I have also came across similar issue on my website's home page.
When I accessed my website from http to https(means after addition SSL) my image slider stopped working.
I tried below workaround:-
replaced all http links on my home page with https.
I assume in this case all http link should have respective https links available.
After that my image slider started working same like earlier it's working with http.

Magento not showing images even if they are in the server

I've installed a Magento theme I bought and since the very first moment it doesn't load images. The weird thing is this:
The site show this:
If I get the url of the first image (Right Click: "Get image url") shows this:
http://ecobiobella.com/media/resized/s/blog/5.jpg
I navigate to this url the images don't exist and I get a 404 error.
The weird thing is that that image is IN MY server and accessible from the server, like this:
As last thing in the root folder public_html I loaded the same image and that gets showed up:
http://ecobiobella.com/5.jpg
I'm not understanding what I'm doing wrong....
Check the media folder for a .htaccess file and remove it.

CKFinder connector.php error 500

I have a website built with CodeIgniter which, for the admin area, is using CKEditor and CKFinder to write posts for the news section.
The CKFinder image uploader was working with no problems, but two days ago I had to move the files on another server. Till then I get the 500 error when trying to upload images.
Behavior:
I open the Upload image modal window. I browse and select an image and when I click the Send to server button I get a 404 error message (the custom 404 page of CodeIgniter). In firebug it shows that there is a 500 internal server error.
File path is plugins/ckfinder/core/connector/php/connector.php and it exists on the server.
I managed to find out the problem was a file permission issue. The folder in which I have to save the images had 777 permission (and for the old server was the good one) and it needed 755 permissions.
To debug this issue i have to add :
ini_set('display_errors', 1);
error_reporting(E_ALL);
in the followings files: config.php and ckfinder.php in the root of the directory ckfinder.

Resources