How to Redirect HTTP to HTTPS using htaccess
To redirect a website from HTTP to HTTPS, you can use the following code in .htaccess file RewriteEngine On RewriteCond %{HTTPS} !=on…
To redirect a website from HTTP to HTTPS, you can use the following code in .htaccess file RewriteEngine On RewriteCond %{HTTPS} !=on…
Some bots can cause a high load on servers as they index too many pages or get into some never-ending loop. last…
You may need to deny access to specific files on your web server for security reasons. On the Apache web server, you…
What is Expires Headers Expires headers are a type of HTTP header that indicates how long until cached copies of site resources…
To redirect a subdomain to a subdirectory, use following .htaccess code. RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)\.domain\.com RewriteRule ^(.*)$ subdomains/%1/$1 [L,NC,QSA] Redirect Subdirectory…
On Apache server, React Application works fine, but if you refresh a page, it shows 404 error. This is because the application…
To redirect a folder to another using .htaccess, create RedirectMatch 301 ^/OLD_FOLDER/(.*)$ /NEW_FOLDER/$1 Or RewriteEngine On RewriteRule ^OLD_FOLDER/(.*)$ /NEW_FOLDER/$1 [R=301,NC,L] Or Redirect…
To password protect a web site or a sub folder using .htaccess, create a .htaccess file in the folder. vi .htaccess Add…
On a web site, customer need to redirect all pages to HTTPS, but want to keep files in one of the folder…
It is better to make web site available with one URL. Many sites work with both wwww and non-www (naked domain) urls.…
A web site had vlunerability, all allowed hacker to upload backdoor script to “uploads” folder used by the script. As a quick…
Limit Access Using htaccess Apache Limit access to a url Disable PHP on a folder How to protect .git folder using htaccess…