[.htaccess] Denegar IP Con Error 404


 
Thread Tools Search this Thread
Top Forums Web Development [.htaccess] Denegar IP Con Error 404
# 1  
Old 10-05-2010
Error [.htaccess] Denegar IP Con Error 404

Saludos amigos programadores de Web.
Mi Problema es, que necesito denegar una IP desde el fichero .htaccess, pero no con el tipico error 403 (Forbidden). sino con el error 404 (Not found). Para quitarme de encima una IP fija que visita constantemente mi servidor para llenar de Spam mis comentarios.
Espero que esto pueda ser posible y que me puedan ayudar. De antemano, Gracias!


Greetings Web Programmers.
I need to deny an IP visitor throught the .htaccess file of my blog with a 404 (Not found), not 403 (Forbidden) error code. is it possible?. Please help me! Tks

Last edited by Ignacio A; 10-06-2010 at 02:33 AM.. Reason: Translation
# 2  
Old 11-12-2010
Try the code below by changing the 10.10.10.10 to reflect the ip in question. The 404.shtml is the page that the ip in question will get in return. The [L] flag will process the request internal to the web engine and the requestor won't know that they were redirected within the site.

RewriteCond %{REMOTE_ADDR} ^10\.10\.10\.10
RewriteRule ^(.*)$ /404.shtml [L]

Mike
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Spacewalk repodata/repomd.xml [Errno 14] HTTP Error 404 - Not Found

I Configured spacwalk 2.7 and synchronized the channels as the root FS was and the server was unresponsive through gui i deleted the cache in /var/cache/rhn & /var/cache/yum and ran yum clean all on the server as well as spacewalk client i could see the following error Loaded plugins: rhnplugin... (0 Replies)
Discussion started by: James0806
0 Replies

2. Web Development

How to log http 404 error to a separate log file?

Apache Web Server: how to log http 404 error to a separate log file and i do not want to log in access.log please advice. (2 Replies)
Discussion started by: raghur77
2 Replies

3. Red Hat

HTTP/1.1 404 Not Found error in Web Server

I am running 2 jboss instances with ports 8585 and 8686 in my web server. Now trying to get header using the command curl -s --connect-timeout 360 -m 360 --head http: // localhost:8686/ then i get the following error HTTP/1.1 404 Not Found Server: Apache-Coyote/1.1 Content-Length: 0... (1 Reply)
Discussion started by: hridan
1 Replies

4. Red Hat

Cant update yum what so ever [Errno 14] HTTP Error 404 - Not Found

Hello!!! I am so frustrated I'm about to snap!!! I cant hear any sound in Firefox or re-install Chrome. Every time I try to do anything with YUM inside my terminal (like update or install) I keep getting this error:failure: repodata/repomd.xml from virtualbox: No more mirrors to try. I... (2 Replies)
Discussion started by: ApacheOmega
2 Replies

5. Shell Programming and Scripting

help with wget and 404 errors

I am trying to use wget to make a local copy of this website accuscore.com/fantasy-sports/nfl-fantasy-sports/Current-Week-DEF-ST (i have the http:// in front, but the forum will not allow me to put it in at this time) Whenever i try to use wget i receive an "Error 404: Not found". I tried the... (4 Replies)
Discussion started by: problemss
4 Replies

6. Web Development

Change internally 403 Error to 404 Error

I have the htaccess file within the folder in the domain I want to deny access to all users, execept one IP, after that redirects Error 403 resulting to a 404 error custom html page as shown below. # Restringting access! deny from all allow from 204.127.111.105 # Example of allowed IP... (1 Reply)
Discussion started by: cgkmal
1 Replies

7. Web Development

HTTP 404 Error Fetches File from Another Server

Has any seen any PHP or other scripting code that will executive on a 404 "File Not Found' error and then fetch the requested file from a different server? (0 Replies)
Discussion started by: Neo
0 Replies

8. Web Development

mod_rewrite RewriteMap - possible to 404?

In my strenuous efforts to get SEO-friendly urls, I'm using a rewrite map in my apache setup: RewriteEngine on RewriteOptions MaxRedirects=5 RewriteMap seo prg:/Applications/MAMP/htdocs/map.php #map requests for the original file to the new SEO friendly urls RewriteCond... (0 Replies)
Discussion started by: sneakyimp
0 Replies

9. AIX

Issue "Error 404" when upgrade AIX 5300-05-CSP-0000 to AIX (5300-09-02-0849)

Please read my issue! My old server using: - AIX system operating (5300-05-CSP-0000) - WebSphere 6.1.0.21 (Fix Pack 21) After I've upgraded version AIX - AIX system operating (5300-09-02-0849) - WebSphere 6.1.0.21 (Fix Pack 21) I have 1 issue when I access home page: "Error... (0 Replies)
Discussion started by: gamonhon
0 Replies
Login or Register to Ask a Question