Reputation: 29
Images are located in /www/images
They are not loading into the page. Not sure why.
My .htaccess file contains the following(I believe the issue is here):
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
This gets rid of the .php and adds a trailing slash. When it is not present, images load. When it is present, they do not.
I would like to keep these settings, but be able to load images.
HTML
<img src="images/imagename">
EDIT: I am positive it is an issue with my .htaccess file.
Upvotes: 1
Views: 39
Reputation: 321
Try it out this way <img src="http://www.example.com/images/imagename">
Or use the following rewrite rule
RewriteEngine on
RewriteRule ^([a-z]+)\/?$ $1.php [NC]
Upvotes: 1
Reputation: 321
Add this below your html head tag <base href="http://www.examle.com" />
Upvotes: 0