简体   繁体   中英

htaccess environmental variables merits and demerits

What are the merit and demerits of environmental variables defined using .htaccess file with special reference to its scope.

Is it safe to define database credentials in .htaccess to secure the host, username and password.

If define some is it only for my hosted account or for all other under the same shared web hosting.

are these variables safe from any external attack?

htaccess files are mainly used to define directory level configs. I would suggest to use a more standard config variant for this purpose like yaml, xml, properties file, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM