I'm trying to send a particular IP, that is trying to get one page on my site, to another page, and do this through my .htaccess file. I've seen many general descriptions of how to do it (in many syntactically different ways) but frankly none of them work. I put these commands, of the sortRewriteEngine OnRewriteCond %{REMOTE_ADDR} ^99\.888\.777\.66$RewriteRule ^/askedforpage\.html /redirecttopage.html [R,NE,NC] in my .htaccess file ... but these commands simply leave my site non-functional. I'm using Apache 2.2, on a Mac with OS 10.6.8.How do I do this??  Here is my .htaccess file, without the deny commands for malicious IPs.Header set Accept-Ranges none   order allow,deny     allow from all   Redirect permanent xyz.html http://xxyyzz.com/header.htm
IP, and page-specific redirect?
htaccess;mod rewrite;apache2
There's not really very much wrong with the code you have posted. There are certainly no errors in your code that should leave your site non-functional. As it stands it is syntactically valid. However, check your line endings to make sure you have no spurious characters - this can cause problems.Try the following:Options +FollowSymLinksRewriteEngine OnRewriteCond %{REMOTE_ADDR} ^99\.888\.777\.66$RewriteRule ^askedforpage\.html /redirecttopage.html [R,NC,L]I have removed the / (slash) prefix in the RewriteRule pattern. The directory prefix is removed in per-directory .htaccess files before the pattern is matched (so URL patterns never start with a slash). I have also removed the NE flag - this is unnecessary in the code you have posted (although is not an error).EDIT: I've added the L (LAST) flag, although to be honest it shouldn't make much of  a difference in this case, providing there are no conflicting rules in your (or another) .htaccess file - which there don't appear to be from your question.It is admittedly more usual to specify the L flag in RewriteRule external redirects since generally you do not want the rewrite engine to reprocess your rules after you have established the redirect.