I have a PHP web app located on shared hosting. My goal is to modify .htaccess file from PHP code when the PHP page is running. I need that .htaccess to insert a couple of mod_rewrite lines into it.
The problem is that on Windows+Apache I can dynamically modify .htaccess file but the same code on Linux reports a problem when I try to access this file in any way (copy or fopen):
"failed to open stream: Permission denied"
I have given .htaccess file 777 permissions - still no result. WHat prevents me from doing this? How can I develop a workaround?
P.S. My initial goal was to be able to add a new RewriteRule into .htaccess that maps a newly added category_id with new category_name.
Bu barındırma paylaşılan değilse, ben (ana Apache config) RewriteMap gibi bir şey kullanmak istiyorsunuz ve harita dosyaya erişmek mümkün olacaktır.
Bu PHP + Apache ile mücadele yapamaz oldum ilk gerçek sınırlama, ama ben çok circuventable umuyoruz.