htaccess Archives | Websiteroof https://websiteroof.com/knowledgebase/tag/htaccess/ The Best Canadian Web Hosting | Web Hosting Canada | Websiteroof Fri, 29 Jan 2021 22:04:04 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.5 https://websiteroof.com/wp-content/uploads/2020/02/cropped-websiteroof-logo-1024-1204-32x32.png htaccess Archives | Websiteroof https://websiteroof.com/knowledgebase/tag/htaccess/ 32 32 How to create a user-friendly URL using .htaccess? https://websiteroof.com/knowledgebase/servers/siteworx-control-panel/how-to-create-a-user-friendly-url-using-htaccess/ Sat, 23 Jan 2021 16:34:12 +0000 https://websiteroof.com/?post_type=epkb_post_type_1&p=6181 If your website is using a long URL like example.com/files/folder/sitemap.html, you can change it into “example.com/sitemap” in .htaccess Modify this line according to your needs and then add this code to your .htaccess file. RewriteEngine on RewriteRule ^sitemap/$   /files/folder/sitemap.html [L]

The post How to create a user-friendly URL using .htaccess? appeared first on Websiteroof.

]]>
How to disable directory browsing using .htaccess? https://websiteroof.com/knowledgebase/hosting/security/how-to-disable-directory-browsing-using-htaccess/ Sat, 23 Jan 2021 15:08:48 +0000 https://websiteroof.com/?post_type=epkb_post_type_1&p=6140 For security purposes, we recommend that you disable directory browsing on your website so no one can see the files/folders of your website. You can disable Directory Browsing by adding this line to your .htaccess file. Options -Indexes

The post How to disable directory browsing using .htaccess? appeared first on Websiteroof.

]]>
How to ban any IP Address via .htaccess? https://websiteroof.com/knowledgebase/hosting/security/how-to-ban-any-ip-address-via-htaccess/ Fri, 22 Jan 2021 20:07:01 +0000 https://websiteroof.com/?post_type=epkb_post_type_1&p=6138 If someone is trying to hack your website or you want to block their IP Address, you can add this line to your .htaccess file. order allow, deny deny from IP-ADDRESS allow from all Replace “IP-ADDRESS” with the IP Address you want to block.

The post How to ban any IP Address via .htaccess? appeared first on Websiteroof.

]]>
How to Edit .htaccess File via the cPanel File manager? https://websiteroof.com/knowledgebase/hosting/cpanel/how-to-edit-htaccess-file-via-the-cpanel-file-manager/ Wed, 20 Jan 2021 20:01:10 +0000 https://websiteroof.com/?post_type=epkb_post_type_1&p=5873 1. Log into your cPanel account. 2. In the “Files” section, click on “File Manger” Icon. 3. cPanel File Manager will be open, select the appropriate domain name or folder location, and press the “Go” button. 4. Navigate to the directory where your .htaccess file is located. If you want to edit the .htaccess file of your root directory, navigate […]

The post How to Edit .htaccess File via the cPanel File manager? appeared first on Websiteroof.

]]>