Accessing Apache Authenticated URLs Directly

While we try to access the apache protected sites it requires username and password to proceed. We can access the access by directly passing the username and password into URL. This will not popup us to provide credentials. The below is the example and syntax usages.

Syntax:
http://USERNAME:PASSWORD@SITE_URL

Example:
http://user1:mypassword@codeexpert.com/view.html
https://king:kingdome@palace.com/cron.php?cron_key=ijdfkdsjifmskw-0k#%9ldxcnmxnvcozxn

 

Category: