Sunday, June 23, 2019

Script for not found page redirect using htacess

Using the .htacess file you can redirect your page to not found page.
 
Follow this step....
  => Create 404 page.
=> Ad the code in htaccess file.
              404 page in htaccess code :
               ErrorDocument 404 /404.html
=> Save the file and upload.


Force domain to https using .htaccess file

using the code your website redirect to HTTPS. You just place below code in your .htaccess file. It will reflect your server within 2 second.

# force ssl
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]