Forum Moderators: phranque

Message Too Old, No Replies

Disabling and enabling access for some users

disabling and enabling access for some users

         

Simon Wickham

11:28 am on Feb 9, 2012 (gmt 0)

10+ Year Member



Hi,

I am looking at disabling and enabling access for some users but the issue I have is once they are connected through the firewall they are all on the same IP address. The other part of this is I need to redirect users that are blocked to Maintenance Page.

At present I have a Rewrite Rules that starts the application and it looks like this in my current httpd.data.conf file:

RewriteRule ^/<path>\.jsp(.*)$ /<path>$1 [R,L]
RewriteRule ^/<path>\.jsp(.*)$ /<path>$1 [R,L]

I then have created the following in the httpd.data.conf:

Include conf/httpd.user.inc
RewriteRule ^/<path>//maintenance.html [R,L]

And my access file looks as followed for httpd.user.inc:

RewriteCond %{LA-U:REMOTE_USER} !^(.)*USER1(.)* [NC]
RewriteCond %{LA-U:REMOTE_USER} !^(.)*USER2(.)* [NC]
#RewriteCond %{LA-U:REMOTE_USER} !^(.)*USER3(.)* [NC]

Can anyone help point me in the right area.

Regards,
Simon

lucy24

9:23 pm on Feb 9, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



RewriteRule ^/<path>\.jsp(.*)$ /<path>$1 [R,L]

Does this part work as intended? What I'm seeing is

#1 pattern with anchor and leading slash, so it should only pick up malformed requests starting in multiple //
#2 path content after ".jsp" implying you have some pages in jsp2 or jspx or whatever it calls itself. The query string will not be picked up here.
#3 target that doesn't include full protocol and URL. This will work but is risky.
#4 target giving 302 (default) rather than R=301

What do you mean by access file? I keep misreading it as htaccess, but if it's your own server there shouldn't be any of those-- except maybe for trivial stuff like directory-specific indexes or error documents.

Somewhere out there, someone is saying "Your real problem is using .jsp at all" ... but that's a different issue ;)