Two issues/questions with X2

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
themrfreeze
-


Joined: 05 Jan 2012
Posts: 6

PostPosted: Thu Jan 05, 2012 9:01 pm    Post subject: Two issues/questions with X2 Reply with quote

Hi all.

I just put a server running X2 2.7 into production, and am very happy with the product so far. I've run into two minor issues though, and was wondering if these have effected anybody else.

First, I'd like to restrict access to certain pages on one of our sites. I'd like people within our organization's range of public IP addresses to have regular access to the pages, with the rest of the Internet needing to enter a username/password to gain access. It doesn't appear that I can do this with X2...I tried adding the pages in question to both the "Access Control" and "IP Address Control" sections, and entering the various allowed IP ranges into "IP Address Control", but when trying to access those pages, it *always* asks for a password, whether you're within the "allowed" range of IP addresses or not. Is this the way X2 normally operates, or am I missing something?

Second, I wanted to restrict access to some other directories with a password. There are a number of identically named directories to protect, which have the syntax:

/something/more/XXX/restricted

where "XXX" is a 3-digit number (there are approximately 30 different ones). The directories to protect are all of the ones named 'restricted'.

I tried creating an entry in the "Access Control" section using wildcards, such as:

/*/restricted
/something/more/*/restricted/
/something/more/???/restricted/

However, none of these worked...I could get into the various 'restricted' directories without entering a password. If I add a directory without wildcards, the password protection DOES work. Am I entering the wildcards incorrectly?

TIA for any help!

Chris
Back to top View user's profile Send private message
jjp671
-


Joined: 01 Aug 2011
Posts: 2

PostPosted: Fri Jan 20, 2012 12:14 am    Post subject: Reply with quote

For the first part of your post this may help, it details how to configure .htacces to redirect a visitor based on their Ip to a specified url, hence you could redirect your Ip's to your folders and redirect everyone else to a login.
Quote:
:: Displaying different pages depending on the visitor's IP address:
Code:
SetEnvIf REMOTE_ADDR <required_IP> REDIR="redir"
RewriteCond %{REDIR} redir
RewriteRule ^/$ /another_page.html


:: For example, redirecting visitors with IP 192.12.131.1 to the page about_my_site.html:
Code:
SetEnvIf REMOTE_ADDR 192.12.131.1 REDIR="redir"
RewriteCond %{REDIR} redir
RewriteRule ^/$ /about_my_site.html
Quoted from: http://www.htpasswdgenerator.com/apache/htaccess.html#13


As for the second part couldn't you just password protect the folder above the one with all your identical folders so they would all be protected by that password protection (eg. "/something/more"). Or are you looking to individually protect these directories?
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group