Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7593439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:10:09+00:00 2026-05-30T21:10:09+00:00

I read here lot of answers about protecting a file on apache server, some

  • 0

I read here lot of answers about protecting a file on apache server, some told htaccess is only for deny user access for files. For me not..

Using the following lines I cant reach the xml, BUT my php script also can’t!

<Files sample.xml>
  Order allow,deny
  Deny from all
</Files>

So how to protect a file from users, so that my php script could access it. The file is in the root dir.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:10:10+00:00Added an answer on May 30, 2026 at 9:10 pm

    If you are on a linux server, have a shell access to it, you change your file permissions to

    chmod 0700 yourxmlfile.xml  # this will make it readable/writable/executable only by the creator of the file.
    

    or in your .htaccess file, you can do this:

    RewriteEngine on
    RewriteRule ^yourfile.xml$ 404.html
    

    where your 404.html could be either a page not found page or any garbage page, which will display as invalid url.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read a lot of answers about it, but sometimes they were arrays and
Why do I read in the answer to most questions here a lot about
I read a lot of questions on here but couldn't figure out what the
I read a lot, also here, but couldn't find a simple way to do
I have read a lot of topic here and people tend to store IP
I have read a lot of related topics here regarding this problem but I
I read here about std::auto_ptr<>::operator= Notice however that the left-hand side object is not
I've read here that editing a file in-place is not possible since it's OS
I have read here http://lostechies.com/jimmybogard/2009/09/18/the-case-for-two-way-mapping-in-automapper/ about how you probably shouldn't be trying to un-flatten
I have googled a lot and read a lot about the leaks issue with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.