htaccess – Email shop Community https://theemailshop.co.uk/community Wed, 04 Dec 2019 06:37:06 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 How would you disable your directory browsing using .htacess? https://theemailshop.co.uk/community/knowledge-base/how-would-you-disable-your-directory-browsing-using-htacess-2/ Wed, 04 Dec 2019 06:37:06 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=1338 For maintaining security, our professionals will recommend you to disable directory browsing on the site so nobody can see the files or folders of your site.
It’s possible to disable your directory Browsing entering the specific line to .htaccess file.

 

 

Options –Indexes

]]>
How to ban the IP address via .HTAccess? https://theemailshop.co.uk/community/knowledge-base/how-to-ban-the-ip-address-via-htaccess-2/ Wed, 04 Dec 2019 06:34:31 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=1324 If any person is trying to hack the website and you want to block their IP Address, then you should simply add this line to your .htaccess file.

 

order allow, deny
deny from IP-ADDRESS
allow from all

 

Replace “IP address” with that address you need to block.

]]>
How to make a user-friendly URL by using .HTAccess https://theemailshop.co.uk/community/knowledge-base/how-to-make-a-user-friendly-url-by-using-htaccess-2/ Wed, 04 Dec 2019 05:26:41 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=1120 If your site has some long URL like example.com/files/folder/sitemap.html, it’s possible to make it into “example.com/sitemap” in .htaccess

you can simply change this line according to your requirements and then add the code to .htaccess file.

RewriteEngine on
RewriteRule ^sitemap/$   /files/folder/sitemap.html [L]

]]>
PHP error- allowed memory size of x bites exhausted https://theemailshop.co.uk/community/knowledge-base/php-error-allowed-memory-size-of-x-bites-exhausted/ Tue, 03 Dec 2019 10:56:35 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=716 If you have an error like “Allowed memory size of… in file /directory/folder/yourscript.php”, then it’s possible to choose .htaccess technique to solve the issue. If an error still exists after applying this .htaccess code, then its best to contact our professionals for more help.

Put this code in the .htaccess file of the main domain, and if the error persists even after using the code, then enter this in a directory where you get an error, like example.com/directory/folder/.htaccess and then put the code in the /directory folder.

 

RLimitMem max

]]>
How would you redirect one page to another page or even website using? HTAcess? https://theemailshop.co.uk/community/knowledge-base/how-would-you-redirect-one-page-to-another-page-or-even-website-using-htacess/ Tue, 03 Dec 2019 10:53:46 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=701 If some page on the website is not existing, and you need to redirect it to another page or even the website then a user can use the .htaccess file for redirection without wasting a minute.

Redirect from a page/directory to another domain or the main domain:

Redirect from one page to another domain:
Rewrite Engine on
Redirect 301 /mypage.html http://example.com

Redirect from one page to another page

Redirect from a page/directory to another page
Redirect 301 /oldpage.html /newpage.html

so, when you open the URL example.com/oldpage.html, it would automatically redirect you to the new page such as example.com/newpage.html.

]]>
How to ban the IP address via .HTAccess? https://theemailshop.co.uk/community/knowledge-base/how-to-ban-the-ip-address-via-htaccess/ Tue, 03 Dec 2019 10:44:14 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=645 If any person is trying to hack the website and you want to block their IP Address, then you should simply add this line to your .htaccess file.

Order allow, deny
Deny from IP-ADDRESS
Allow from all

Replace “IP address” with that address you need to block.

]]>
How would you restrict the directory access by IP address? https://theemailshop.co.uk/community/knowledge-base/how-would-you-restrict-the-directory-access-by-ip-address/ Tue, 03 Dec 2019 10:32:53 +0000 https://theemailshop.co.uk/forum/?post_type=epkb_post_type_1&p=589 If you want to make your admin areas secure from hackers, it’s better to allow access only from the selected IP address to the admin directory. You can just make .htaccess file in your directory where you need to restrict the access by IP Address.

For instance, if your WordPress blog has installed on the main directory such as example.com/wp-admin, it’s better to build .htaccess file in /wp-admin/.htaccess and you need to place this code, and do not forget to replace the allowed IP with your own IP address.

Order deny, Allow
Deny from all
Allow from YOUR-IP-ADDRESS-HERE

(Replace “Your-IP-Address-Here” with the IP Address)

You need to check this out by accessing your /wp-admin IP address from some other IP address that is not allowed by your .htaccess file.

]]>