I am developing a project in laravel 4.2. In this project, inside public folder there are folders like css, js, img and images. I want to protect direct access of files inside js, css,img folder via url like by typing in browser like "www.example.com/css/style.css". How will I do that? Can anyone help? I saw some methods by using .htaccess file. But if I deny access via .htaccess file, I cannot access these file code too. Is there any method, that can be implemented by programming? Thanks
Asked
Active
Viewed 785 times
2
-
1Try this http://stackoverflow.com/questions/10236717/htaccess-how-to-prevent-a-file-from-direct-url-access – Imesha Sudasingha Jun 04 '16 at 05:48
-
@ImeshaSudasingha : thans, it is working for normal websites. But in my case, there are many projects under the same domain, like prj1.example.com,prj2.example.com. I want to block direct access of css, js files in all projects. Unfortunately above solution is not working. do you have any idea? – manoos Jun 09 '16 at 08:05