how to redirect pages to home page

black-clover

Member
Nov 9, 2018
6
2
3
mexico
cPanel Access Level
Website Owner
Hi,
I'm a total beginer so forgive me if this question seems stupid.
I have created my website which it is managed with cpanel.
I have several directories with stored files which I want the user to be able to access through the menus but not to access directly to the parent directory.
So I think i need to establish redirection policies in the apache server to redirect user trying to access said directories to the home page.
I have searched in the cpanel main page for a way to access apache configuration but wasn't able to find how.
So, first question is:
how do I access apache configuration?
and
How do I establish a redirection policy?

Thanks
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,257
313
Houston
Hello @black-clover

You cannot access the apache configuration through cPanel, in fact, we don't actually recommend you make direct modifications to the Apache configuration at all. If you only have access to cPanel to add the redirects you'll want to either use the redirects interface in cPanel or create them in the .htaccess for the domain.

The documentation on redirects might be useful Redirects - Version 76 Documentation - cPanel Documentation


Thanks!