Dexie

msg:4291970 | 7:53 pm on Apr 4, 2011 (gmt 0) |
I've tested it with my IP address, but it still never takes me to the 403.php page ? ? I'm almost 100% sure I've followed the instructions in these threads. Any help much appreciated. Dexie
|
g1smd

msg:4292044 | 9:34 pm on Apr 4, 2011 (gmt 0) |
Your RewriteRule is looking for a URL request like www.example.com/<anything-or-nothing>/403.php and fails to specify a new URL to redirect to. Even if your code had worked, it would have sent a 301 response back, and not a 403 response. Omitting the IP checks (add those back in yourself) the rule should be something like:
RewriteCond %{REQUEST_URI} !/403\.php RewriteRule .* - [F]
ErrorDocument 403 /403.php
|
Dexie

msg:4292307 | 9:20 am on Apr 5, 2011 (gmt 0) |
Thanks for that, it's appreciated. The request is just to affect unwanted IP's. I still want any good IP's that have just typed in the wrong address to get a 404 and then redirect to the home page after a short message to say that they will be redirected to the home page in a few seconds. Does what you suggest affect that at all please?
|
Dexie

msg:4293591 | 7:29 am on Apr 7, 2011 (gmt 0) |
Anyone ?
|
g1smd

msg:4293822 | 7:09 pm on Apr 7, 2011 (gmt 0) |
The 404 ErrorDocument should be served at the originally requested URL, should return a 404 HTTP status, a plain text human readable error message, and optionally some clickable links to related content. It should not "redirect" anywhere, especially not to the home page.
|
Dexie

msg:4293841 | 8:06 pm on Apr 7, 2011 (gmt 0) |
Thanks for the info. I'm getting a little confused as I feel a little out of my depth here ;-( I know on one of my sites, if a user types a wrong url into the address bar, it takes them to an error page, then after 5 seconds, it refreshes them to the home page.
|
g1smd

msg:4293848 | 8:15 pm on Apr 7, 2011 (gmt 0) |
Ah, the refresh is likely using javascript or the meta refresh element. That's generally not a good idea. It can confuse humans a searchengines alike.
|
|