The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Protect HTML files - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28) +--- Forum: Off-topic Discussions (https://userspice.com/forums/forumdisplay.php?fid=10) +--- Thread: Protect HTML files (/showthread.php?tid=606) |
Protect HTML files - truemama - 06-20-2017 Hi, I've configured my server via htaccess to process .html in the same way as .php and want to ptotcet those files in same way, the current access pages doesn't pick up the HTML extension....in user cake I was able to change which file types were automatically picked up but can't find that in the code....could anyone please point me to where in user spice it pulls in the permissionable files? Thanks in advance! Protect HTML files - dan - 06-20-2017 You have to rename your HTML files to PHP. Protect HTML files - truemama - 06-20-2017 hi Dan, yep understand that would fix it but I'd really rather keep .html (massive project I'm upgrading to userspice from userckae)...do you know where in the code it identifies which files to include/exclude so I could add .html as an extension to include? Cheers, Matt Protect HTML files - Brandin - 06-20-2017 Even if you get the system to recognize the .html extension, you won't be able to run the required PHP code to die(); if the user doesn't have access or redirect them to whatever page. Protect HTML files - truemama - 06-20-2017 It will, my server is configured to parse .html as if it's a .php so executes all the php functions it's covered here: https://stackoverflow.com/questions/4687208/using-htaccess-to-make-all-html-pages-to-run-as-php-files Protect HTML files - Brandin - 06-20-2017 I'm not finding anything in init.php or admin_pages.php that is specific to only allowing .php files, so it must be something related to compatibility in the PHP functions...Look at Code: z_us_root.php Code: init.php Code: admin_pages.php Protect HTML files - firestorm - 06-20-2017 i would look in us_helpers.php and helpers.php where there are functions that look for php pages but i dont understand the logic in running html as php, when you consider any file with a php file extension will run html and jquery etc even with no php logic written in it, why not just change your file extensions which is much easier, if the reasoning is to pretify urls then that can be acheived easily in htaccess Protect HTML files - mudmin - 06-21-2017 It would be a royal pain. If you want to though you could go to us_helpers.php and copy getPathPhpFiles function into usersc/custom_functions.php, rename the function and add your html files. Then you would have to call that function from admin_pages.php to get those pages into your db. |