We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Block paths for users | Forum

Topic location: Forum home » Support » General Questions
Dirk
Dirk May 22 '15
Hi,


I would like to know how can i block certain paths for users EXAMPL:


https://hardstyleunited.com/users


I don't want our users to access this URL with all the users in one page. Can I disable this.



//Dirk

tammy harris
tammy harris May 22 '15
in admin pages you can remove it from the menu
you can also try restrict view so no one can view the page
Dirk
Dirk May 22 '15
Hi Tammy,


Already removed it. But if you still use this path you can access it. I don't even want registered members to see this page. I need to end up on a "this page does not exist"

tammy harris
tammy harris May 22 '15
admin pages edit the page and set permissions to no one can view it
Dirk
Dirk May 22 '15

Hi Tammy,


I did all of this look:





Still its visible for all.

tammy harris
tammy harris May 22 '15
thats strange 


Dirk
Dirk May 22 '15
And I cant find the problem. Looks like a bug. 
tammy harris
tammy harris May 22 '15
theres no permission hmmmm only views 
only solution i can think of is do a redirect in cpanel
point https://hardstyleunited.com/users
to 
https://hardstyleunited.com


Dirk
Dirk May 23 '15
But there must be another way right? 
DeFender
DeFender May 23 '15
look here maybe youll find the answer http://u2.hol.es/forum/topic/2
Dirk
Dirk May 24 '15
If fixed it myself by changin the HTACCESS file by adding this:


#Redirect a sub folder to another siteRedirect 

301 /users https://hardstyleunited.com/


this will make sure its redirected to main page. Not the preferred solution since the site admin cant access it. But it works right :). The solution you gave Defender works like a charm but still registered users are able to access this page. I dont want anyone access this page except site admins. So maybe we can add "admin" in or how to define the admin user.



  if ( !OW::getUser()->isAuthorized('base', 'view_profile') )
        {
            $status = BOL_AuthorizationService::getInstance()->getActionStatus('base', 'view_profile');
            $this->assign('authMessage', $status['msg']);
            return;
        }



The Forum post is edited by Dirk May 24 '15
Taissa Team
Taissa May 25 '15
Dirk Meij, have you seen this post: http://www.oxwall.org/forum/topic/33893?page=1#post-140460 ?