Results 1 to 6 of 6

Thread: Is this correct

  1. #1
    Aijan7cool's Avatar
    Aijan7cool is offline Junior Member
    Join Date
    Dec 2009
    Location
    London
    Posts
    12

    Question Is this correct

    Is this code correct? Also how do I allow five IP's only and deny the rest to my www.site.com/index.php. Below I have one allowed.

    <Directory /path/to/index/>
    Order Allow,Deny
    Allow from 1.2.3.476.89
    Deny from all
    </Directory>

    Thanks.

  2. #2
    Gallier's Avatar
    Gallier is offline Junior Member
    Join Date
    Sep 2009
    Posts
    21

    Default

    If you add this directive, you need adding AllowOverride All into httpd.conf (not secure)

    put your .htaccess into /path/to/index/

    with

    Order Deny,Allow
    Deny from all
    Allow from 123.123.123.121
    Allow from 123.123.123.122
    ...
    Allow from 123.123.123.125

    OR addin into httpd.conf

    <Directory /path/to/index/>
    Order Deny,Allow
    Deny from all
    Allow from 123.123.123.121
    Allow from 123.123.123.122
    ...
    Allow from 123.123.123.125
    </Directory>


    P.S. May be better to use .htpasswd?
    Make your website the fastest one - Web Optimizer* web.stakh.com

  3. #3
    Aijan7cool's Avatar
    Aijan7cool is offline Junior Member
    Join Date
    Dec 2009
    Location
    London
    Posts
    12

    Default IP restriction using htaccess....

    Thanks. What will a code like this show in the browser? [The xxxx is where the IP will go.]



    <Limit GET POST PUT>
    order deny,allow
    deny from all
    allow from xx.x.xxx.xxx
    </Limit>

  4. #4
    Gallier's Avatar
    Gallier is offline Junior Member
    Join Date
    Sep 2009
    Posts
    21

    Default

    It depends on the situation

    read this (core - Apache HTTP Server#limit )
    Make your website the fastest one - Web Optimizer* web.stakh.com

  5. #5
    Aijan7cool's Avatar
    Aijan7cool is offline Junior Member
    Join Date
    Dec 2009
    Location
    London
    Posts
    12

    Default

    To allow my self and deny all other Ip's, would a simple code like the one below be best?

    order deny,allow
    deny from all
    allow from 12.345.6.78.9

  6. #6
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Smile

    Quote Originally Posted by Aijan7cool View Post
    To allow my self and deny all other Ip's, would a simple code like the one below be best?

    order deny,allow
    deny from all
    allow from 12.345.6.78.9
    Correct

    Rock _a.k.a._ Jack
    Windows Hosting || Windows Reseller Hosting
    Cloud Hosting 100% UPTIME! || Powerful Dedicated Servers
    Follow eUKhost on Twitter || Join eUKhost Community on Facebook

    For complaints, grievances or suggestions kindly email our FeedBack Dept.
    Proper action will be taken accordingly & instantaneously!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •