how to block a file in cpanel?
TRANSCRIPT
![Page 1: How to block a file in cpanel?](https://reader036.vdocuments.us/reader036/viewer/2022082702/554ef447b4c90577698b467a/html5/thumbnails/1.jpg)
How to Block The Control Access of a folder in Wordpress
![Page 2: How to block a file in cpanel?](https://reader036.vdocuments.us/reader036/viewer/2022082702/554ef447b4c90577698b467a/html5/thumbnails/2.jpg)
Proceed with the following Steps:
1. For Example I have home/exp-site/public_html/wp
In that create a File named .htaccess
2. Start with # BEGIN WordPress
3. Write Some Rules for it namely,
![Page 3: How to block a file in cpanel?](https://reader036.vdocuments.us/reader036/viewer/2022082702/554ef447b4c90577698b467a/html5/thumbnails/3.jpg)
Proceed with the following Steps:(contd.)
For example,<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /wp(Folder_name)/RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /wp(Folder_name)/index.php [L]</IfModule>
![Page 4: How to block a file in cpanel?](https://reader036.vdocuments.us/reader036/viewer/2022082702/554ef447b4c90577698b467a/html5/thumbnails/4.jpg)
Under that enter the code followed below:Options -Indexesdeny from all
![Page 5: How to block a file in cpanel?](https://reader036.vdocuments.us/reader036/viewer/2022082702/554ef447b4c90577698b467a/html5/thumbnails/5.jpg)
If you want to Allow some of the IP,
Enter the Following code behind it,
allow from 54.18.17.168allow from 53.64.47.64allow from 25.51.5.70
![Page 6: How to block a file in cpanel?](https://reader036.vdocuments.us/reader036/viewer/2022082702/554ef447b4c90577698b467a/html5/thumbnails/6.jpg)
Finally end the Code with the following code,
# END WordPress