Quote:
Originally Posted by Boofo
What does RewriteBase / do? I haven't used that yet but I do have some re-directs.
|
Since "we" want to apply rewrites for the entire Vhost / Directory or wherever you placed your rewrite, we set it this way.
RewriteBase has to be absolute related to the location where you want to apply it's rules.
If you place it with
RewriteBase /
in your Docroot <directory> block it rules apply for all handled subdirectories, if you place it inside a <directory> block only this directory.
Another way would be placing it inside your Docroot <directory> block and using another RewriteBase.
As example:
Quote:
<Directory /your/document/root/>
...
RewriteBase /subdirectory
...
</Directory>
|
And
Quote:
<Directory /your/document/root/subdirectory/>
...
RewriteBase /
</Directory>
|
Basically do the same. Up to you on how you want to organize your rules. I've a "rewrite.conf" file that is loaded via include - more easy to overview for me.
Well - that was kinda off-topic
And about the plugin:
I would still keep the point that it's not good to apply blocks at the latest level of the chain because the IP and the traffic already made it the PHP parser and PHP is busy reading the IP via REQUEST or X_FORWARDED_FOR, open a database, read more data, compare, apply or not apply block etc. etc. etc.
And someone who can't create a .htaccess or add a line like:
Deny from 254.254.254.254
To block this IP shouldn't maybe have his own server and rent either a managed machine or some shared hosting.
Blocking via PHP is like letting the burglar into your house then trying to take care of him while it would be better to just close the door and the windows that he can't even make it into.