Jump to content

htaccess xml file downlaods


mark107

Recommended Posts

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 post
Share on other sites

Use your favorite mechanism for restricting access (like an Order), and then use a to override that specifically for Myxmlfilename.xml.

Link to post
Share on other sites

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,deny
then a with an Allow that grants access instead.

<Files "Myxmlfilename.xml">
  Allow from all
</Files>
Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.