...

View Full Version : htaccess issues, deny from [..]



EcKstasy
05-19-2009, 05:37 PM
Hi, I'm having trouble with deny from [...] in .htaccess, such as below:


# Spammers
order deny,allow
deny from 72.20.5.6
deny from 94.27.74.125
deny from 93.174.93.200
deny from 212.117.188.139
deny from 80.67.6.226
deny from 212.117.188.135
deny from 95.168.177.79

<Files "settings.php">
Order Allow,Deny
Deny from All
</Files>

RewriteEngine on
RewriteRule ^([0-9]+)$ index.php?$1
RewriteRule ^latest$ index.php?p=latest
RewriteRule ^top$ index.php?p=top
RewriteRule ^bottom$ index.php?p=bottom
RewriteRule ^browse$ index.php?p=browse
RewriteRule ^random$ index.php?p=random
RewriteRule ^random1$ index.php?p=random1
RewriteRule ^search$ index.php?p=search
RewriteRule ^add$ index.php?p=add
RewriteRule ^queue$ index.php?p=queue
Options All +Indexes

Deny from ip seems useless, everything else works apart from the deny rules. does anyone have any suggestions as to what may be the problem?

EcKstasy
05-19-2009, 07:25 PM
Ok guys, I got it working.. for anyone else that needs to know the answer to the correction:


Order Allow,Deny
Deny from 72.20.5.6
Deny from 94.27.74.125
Deny from 93.174.93.200
Deny from 212.117.188.139
Deny from 80.67.6.226
Deny from 212.117.188.135
Deny from 95.168.177.79
Allow from ALL

<Files "settings.php">
Order Allow,Deny
Deny from All
</Files>

RewriteEngine on
RewriteRule ^([0-9]+)$ index.php?$1
RewriteRule ^latest$ index.php?p=latest
RewriteRule ^top$ index.php?p=top
RewriteRule ^bottom$ index.php?p=bottom
RewriteRule ^browse$ index.php?p=browse
RewriteRule ^random$ index.php?p=random
RewriteRule ^random1$ index.php?p=random1
RewriteRule ^search$ index.php?p=search
RewriteRule ^add$ index.php?p=add
RewriteRule ^queue$ index.php?p=queue

schleppel
05-20-2009, 07:24 PM
You can simplify the mod_rewrite

Options All
Options +FollowSymLinks +Indexes

RewriteEngine On

RewriteRule ^([0-9]+)$ ./index.php?$1 [QSA,L]
RewriteRule ^(latest|top|bottom|browse|random1?|search|add|queue)$ ./index.php?p=$1 [QSA,L]



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum