————————————————————
– Redirect 301 index.php placed in root folder will redirect it to specifed path as below:

' <?
Header("HTTP/1.1 301 Moved Permanently");
Header("Location:https://pin55.com/php-schoolz/%22;
?> '

or

'<?php
header('location:https://pin55.com/';
?>'

Why would you need to use it? For example if you can not set up redirection on IIS or Apache webserver folder for some reason, and you need to redir to something like int this example 'https://pin55.com/php-schoolz/' where CNAME DNS record is not recognizing file structure (the / signs) and DNAME record is not exactly being wildly used by ISP's.

————————————————————
– set up password on folder
.htaccess file in folder you want to protect with content inside it:

AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/vol4pin55.com/.htpasswd
AuthGroupFile /dev/null
require valid-user

Then place password file in root folder called
.htpasswd
with usernames and passwords list generated to acceptable format as sample below:

user1:0xvoP6Cq.TIjQ
user2:/UE36QUF3Ama6

You use simple and free .htpasswd and .htaccess generator as this one here:
http://tools.dynamicdrive.com/password/
————————————————————

One Response