Blocking LINK with HTACCESS

Asked

Viewed 113 times

1

Do I need to lock a link just inside a server, how would I use HTACCESS? If there is any way. Thank you.

  • It is an internal network or external link?

  • would even be internal

  • Instead of htacess, why don’t you edit the Windows hosts? It works great: 127.0.0.1 your address

  • Because my server is linux, I have no other permission than htaccess Diego

  • I think I understand what you want, see the answer I posted.

1 answer

1


Instead of blocking, I believe that the ideal would be to redirect. If the link is accessed, directs to any other page:

# MAINTENANCE-PAGE REDIRECT
<ifModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REMOTE_ADDR} !^123.456.789.000
  RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
  RewriteCond %{REQUEST_URI} !.(jpe?g?|png|gif) [NC]
  RewriteRule .* /maintenance.html [R=302,L]
</ifModule>

Source

Browser other questions tagged

You are not signed in. Login or sign up in order to post.