: Password protecting dynamic URLs in Apache I am handling many logical files request using the Apache server. To make the path simple I have used mod_rewrite in the httpd.conf. Now I am planning
I am handling many logical files request using the Apache server. To make the path simple I have used mod_rewrite in the httpd.conf.
Now I am planning to enforce authentication on these logical file (dynamic content) in .htaccess. Apache Documentation tells that only Files directives can be used in .htaccess.
Files directive only accept the path of the files that are present on the disk and does not support logical files. How do I overcome this? How can I give the full path of my URL to enforce diff types of authentication?
More posts by @Shanna517
1 Comments
Sorted by latest first Latest Oldest Best
An easy method would be to use a trigger, calling a php file that physically exists on the disc and calling it in your dynamic content which should trigger the password prompt.
You'd just need to use an empty php file in say /protected/ and ensure that the rest of the file isn't processed until the empty php file is read.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.