mark107 Posted May 16, 2014 Share Posted May 16, 2014 Hi guys, I need your help. I have .xml file in download directory on my server. whoever visit my site page (Myxmlfilename.xml) user should be able to download these files and other files should not. I am trying to achieve above but no luck... does anyone know how I can access to Myxmlfilename.xml to download the xml file? thank you in advance. Link to comment https://forums.phpfreaks.com/topic/288549-htaccess-xml-file-downlaods/ Share on other sites More sharing options...
requinix Posted May 16, 2014 Share Posted May 16, 2014 Use your favorite mechanism for restricting access (like an Order), and then use a to override that specifically for Myxmlfilename.xml. Link to comment https://forums.phpfreaks.com/topic/288549-htaccess-xml-file-downlaods/#findComment-1479760 Share on other sites More sharing options...
mark107 Posted May 16, 2014 Author Share Posted May 16, 2014 How I can open the htaccess to change the policies to allow me to download the Myxmlfilename.xml? I have no idea how to open the htaccess. Link to comment https://forums.phpfreaks.com/topic/288549-htaccess-xml-file-downlaods/#findComment-1479761 Share on other sites More sharing options...
requinix Posted May 16, 2014 Share Posted May 16, 2014 It's a file. If you don't have one then make it - it goes in the folder that contains that XML file. Inside it, use an Order to limit access to everything, # deny by default Order allow,denythen a with an Allow that grants access instead. <Files "Myxmlfilename.xml"> Allow from all </Files> Link to comment https://forums.phpfreaks.com/topic/288549-htaccess-xml-file-downlaods/#findComment-1479778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.