简体   繁体   中英

Issue viewing images on localhost with wamp

So I pulled down a site I need to work on and the images are not working correctly. The problem seems easy to fix, I just don't know the solution or what to search for to find it.

My image tags are coming out thus:

<img src="/sites/all/themes/dttulsa/gfx/SN_Header_std.png" />

The problem is the extra / in from the of the src. If I edit it with dev tools to:

<img src="sites/all/themes/dttulsa/gfx/SN_Header_std.png" />

it works! Is there a htaccess rule that I can use to fix this? Some wamp option? Any help is appreciated.

Your second url is relative to the location page you are accessing it from, I would guess that your website path in apache isn't set up properly and therefore is causing your first url to not find the file (for example it may be looking in C:/wamp/www when your actual site is in C:/wamp/www/mysite). I'd look to the apache configs and see if you could find anything there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM