The site is on shared hosting. I need to password protect a single URL.
http://www.example.com/pretty/url
Obviously that’s not a physical file path I’m trying to protect, it’s just that particular URL.
Any quick solution with .htaccess?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be able to do this using the combination of mod_env and the
Satisfy anydirective. You can useSetEnvIfto check against theRequest_URI, even if it’s not a physical path. You can then check if the variable is set in anAllowstatement. So either you need to log in with password, or theAllowlets you in without password: