Ubuntu 16.04 LTS, Apache2 is in use as virtualBox. I changed the file from "Server Domain/File Path" to "Server Domain/rewrite Rule" using the rewrite module. The problem is that I want to access the file only for "Server Domain/rewriteRule" and "Server Domain/File Path" to display Not Found, but both have access to the file.
Is there a way to solve it with Apache settings?
php webserver apache mod-rewrite
They say that they use the following method to prevent using only the images on their site by referring directly from the outside.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]
I'm sharing it because I think we can use php instead of gif or jpg by applying this. Source
© 2024 OneMinuteCode. All rights reserved.