Hello, dear forum members!

search engine to load pages with two extensions from another site with the same ip

I recently discovered that search engines began to download many such links, i.e. with two extensions *.php and *.png :

  • Домен/centr.php/hgfj/ghkgh/ghkghk/khgkg/foto1.png
  • Домен/doc.php/hjf/hkgkg/gkhghk/foto2.png
  • Домен/karta.php/ljhl/khgkgh/ghkg/adress.png
  • ...

There are normal direct links:

  • домен/*.php
  • домен/kartinka/foto.png

Moreover, these pages are created from other domains, but from the same ip address, as it’s spinning on one server. It turns out the domain and the final image or document satisfies the requirement, but here the folders are taken from another site домен**/папка/папка/**foto1.png .

If you translate into ip, then the page is well glued together, like:

 00.00.00.00/doc.php/gfhfgj/jfgjfg/jfgj/price.xlsx 

How to forbid links like this: domain / *. Php / /kartinka/foto.png ?

I apologize in advance if the essence of my problem was stated incorrectly.

  • Hmm, here you have an example. Домен/centr.php/hgfj/ghkgh/ghkghk/khgkg/foto1.png . And at Домен/hgfj/ghkgh/ghkghk/khgkg/foto1.png there is a real map? Or are these parts of the url after .php generated randomly? - Visman
  • A picture could have been, only most links to a picture have relative links and not absolute ones - RulonOboev

1 answer 1

Try this in the .htaccess file for the apache server.

 RewriteEngine On # если после расширения .php идет слэш и потом может встретиться подстрока .png RewriteCond %{REQUEST_URI} \.php/.*\.png [NC] # то вернем стандартую 404 ошибку сервера RewriteRule ^ - [R=404,L] 

And better so

 RewriteEngine On # если после расширения .php идет слэш, а такого не должно быть RewriteCond %{REQUEST_URI} \.php/ [NC] # то вернем стандартую 404 ошибку сервера RewriteRule ^ - [R=404,L] 
  • Thank you so much, how can I thank you? - RulonOboev