Hi Kadomi,
From your description, my understanding is that you want to restrict your users to access site content and site setting pages.
You could use CSS code to hide site content and site settings, please refer to this code below:
<style type="text/css">
a[title='Site contents']
{
display:none;
}
a[title='Site settings']
{
display:none;
}
</style>
You could restrict users to access these pages with http module check if current URL contains the URL of site these pages, if current URL contains the URL of site content or site setting you could redirect to a new page to warn uses that they do
not have permission to access this page.
you could refer to this code below to check current URL in http module:
if (HttpContext.Current.Request.Url.AbsoluteUri.Contains(“_layouts/15/viewlsts.aspx”)||HttpContext.Current.Request.Url.AbsoluteUri.Contains(“_layouts/15/settings.aspx”))
{
HttpContext.Current.Response.Redirect(“special page”);
}
Please refer to this article about how to use http module in SharePoint 2013:
SharePoint & Http Module Example
http://www.jeanpaulva.com/index.php/2014/10/30/sharepoint-http-module-example/
Best Regards,
Vincent Han
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
tnmff@microsoft.com.
