Jump to content

Admin Area / HTACCESS REDIRECT


Recommended Posts

Folks,

 

In the documentation it says about DENY/restrict access to the admin area by using a .htaccess file.

I want to stake this a step forward.   If you don't have an IP in the list of 10.x.x.x then you are redirected to another website with an UNAUTHORIZED page.

The .htaccess file works for the main admin section, but if you are ALLOWED and you get login to the admin area then certain LINKs don't work anymore.

such as the "Addons -- Apps & Integrations"  -- I get page not found.

 

The htaccess file I used (I am no expect with htaccess).

 

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$
RewriteRule ^(.*)$ http://domain.com/?id=95 [L]

 

Link to comment
Share on other sites

My .htaccess file in the WHMCS directory is as follows.
If you not on the ALLOW list...you get the 403 redirect.

<Limit GET POST>
 order deny,allow
 deny from all
 allow from 10.
 allow from 208.74.120.226
</Limit>

ErrorDocument 403 http://domain.com/?id=95&URL=client.hosting.domain.com/ADMIN/

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated