Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2007
    Location
    Estonia
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Deny from all - respond with 404 statuscode instead of 403

    I use Apache directory directives to block access to certain media on a site. But instead of blocking access to something, I want to hide it by responding with a 404. How can I do it? And is it possible without using mod rewrite?

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    377
    Thanks
    0
    Thanked 26 Times in 26 Posts
    The only way i can think of is with mod_rewrite
    Code:
    Options +FollowSymLinks
    
    RewriteEngine On
    
    RewriteRule ^thedirectory(/.*)?$ /404 [L]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •