any .htaccess experts here?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- any .htaccess experts here?
any .htaccess experts here?
30-08-2014 7:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
------
Can't figure out why the code below is producing a 500 code and not a 403 (as it should) when the offending referrer visits the website.
* (This is not an overall 500 when loading the site. I mean the code that only the offending visitor sees.)
RewriteEngine on
RewriteCond %{HTTP_REFERER} unwantedreferrer\.com [NC]
RewriteRule .* -
Have tried with
Options +FollowSymlinks
added and removed. Same result.
This is on a sub-domain. Have also tried including the .htaccess rewrite on the main domain as well. Same results.
I had other rewrite commands already used without the +FollowSymlinks enabled, so not sure that it was necessary at all. Nevertheless, getting wrong code returned here anyway.
Probably need to chat to ISP about this, maybe its just firing the wrong code (it is actually blocking the visitor, so not major problem), but just wondered if there were any bright sparks on here before I do that!
Btw, yes, have checked Apache site. Could be missing something, but didn't find much.
Re: any .htaccess experts here?
31-08-2014 12:32 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Edit: I tried your code (adapted for my referrer) on Plusnet Homepages and was served a 403 Forbidden page as expected.
Re: any .htaccess experts here?
31-08-2014 1:11 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
There hasn't been anything showing in the error log for a while. That's been the other odd thing. Blank white page.
But it has started producing logs again tonight - a few 403s reported from blocked IPs.
Looks like I'll have to wait for the offending referrers to return and keep checking the error logs!
I'll post back if anything shows up.
Thanks
Re: any .htaccess experts here?
31-08-2014 3:36 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
http://httpd.apache.org/docs/current/mod/core.html#allowoverride
Re: any .htaccess experts here?
31-08-2014 7:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Yes, have had several 'rewrites' in operation for yonks.
I'm now waiting to see if error logs will give a clue next time it crops up.
After that probably contact host. Could be something else about directives.
(There was a funny glitch on the server a couple of years ago where it was producing 404s instead of 403s which was recified at their end - no idea how that works!...)
Re: any .htaccess experts here?
31-08-2014 9:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: any .htaccess experts here?
31-08-2014 11:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Still wating for one of the offending referrers to hit again. Last week I was inundated.
They wont come now I want them to! Maybe they got the message... job done.
(Doubt that actually - these were obviously zombied from all over the place - most Brazil. They'll be back alright.)
But stil want to know what's wrong with it.
Re: any .htaccess experts here?
01-09-2014 6:51 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
But the logs are showing it as 500.
I presume this means the 500.shtml file is being used.
I've added a bit to the 500 file to say its either a server error or not permitted!
Guess I'll drop a line to the host. Must be something there

Re: any .htaccess experts here?
01-09-2014 11:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: any .htaccess experts here?
01-09-2014 11:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
And 403 displays fine for 'deny from IP'.
A far as the error log shows this rewrite should be displaying 403, too.
Perplexing why it doesn't...
edit --
perhaps I could fake a referrer and see what does actually happen...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- any .htaccess experts here?