Tags » Htaccess
If you like to replace a url segment or folder , you can follow :
Some time we need to close specific domain for public.
You can write this to your htaccess file.
SetEnvIf Host staging.domain.com passreq AuthType Basic AuthName "Password Required" AuthUserFile /full/path/to/.htpasswd Require valid-user Order allow,deny Allow from all Deny from env=passreq Satisfy any
The HtAccess is a small and hidden file that is located in the main file directory of a website. Every website has an htaccess document by default, but if not, an htaccess document can also be self created and it will work just the same. 139 more words