I have php code in my * .html file. where is the link

echo 'img src="rs.ru/images/cat_pic_files/123123.jpg"></a> 

Must be

  echo 'img src="rs.ru/images/cat_pic_files/123123.jpg/"></a> 

With a slash picture is not visible. It is clear - the Apache is looking for a folder instead of a picture.

How to make the slash to be (and in the url too), the picture was displayed, without mod rewrite?

  • My advice to you is to always give pictures with an extension. To answer your question put all the rules for url'ov. - lampa
  • Which rules? mod_rewrite? - ferz721
  • @ ferz721 yes. - lampa
  • @lampa slightly error, picture with extension. need a slash. - ferz721

2 answers 2

 RewriteRule ^(.*)\.(png|jpg|ico)\/$ $1.$2 [R=301,L] 

While invented only a redirect.

      echo 'img src="р http://rs.ru/images/cat_pic_files/123123.jpg"></a>