1

I have my .htaccess setup as

order deny, allow
deny from all
allow from 123.my.ip

my IP is what ipchicken is giving me yet I am getting internal server error from any address. I have also tried multiple IP locations.

Following Apache copied from there site with this format just gives me forbidden even from my address...

Order Deny,Allow
Deny from all
Allow from my.ip.address

I have followed this question with no success...

.htaccess block all but my ip

I have also tried below from the following link with the same results...

http://kb.siteground.com/how_to_redirect_all_visitors_except_your_ip_to_another_site/

 RewriteEngine On
 RewriteBase /
 RewriteCond %{REMOTE_HOST} !^1.2.3.4
 RewriteRule .* http://www.anothersite.com [R=302,L]

Just in case its relevant, i'm running magento on a AWS server. Running out of ideas to try...

Community
  • 1
  • 1

1 Answers1

0

If you tried:

order deny,allow
deny from all
allow from {111.111.111.111} <-- example ip

its very straight forward that it should be working

what you need to do is enable rewrite.log in your apaches virtualhost config to determine whats going on in there with mod rewrites/

make sure that you have given your apache virtuahost auth to read from .htaacess file ** Override to All

you shouldn't use mod_rewrite rules to disallow any ip but your, keep that for specific page rewriting, the above code should be fine.

Make sure! that you're IP address is your Internet ip address and not an internal ip address. Go on google and type in "what is my ip" it should give you the correct one

if none works, there's definitely something funky going on with your .htaccess file. Try to paste your entire .htaccess file to somewhere where we can all view it. There may be errors on your .htaccess file. Make sure magentos admin isn't over-writing your .htaccess file.

with .htaccess its a big factor where you place the rules. sometimes having too many things on there can confuse the web server if its not in order.

unixmiah
  • 3,081
  • 1
  • 12
  • 26