View Single Post
Old 01-08-2013, 01:45 PM   PM User | #5
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
Rather than monkeying around with the .htaccess, would it be possible to simply store the *.txt files above the webroot somewhere? It would be much simpler and if you REALLY don't want to allow access to the text files this is where they probably ought to be anyway.

That said, if you need to keep things the way they are then (depending on your application) you may need to use your host server's actual IP address rather than 127.0.0.1.

For example, I believe if you're using file_get_contents with a full URL to your text files (as opposed to using the local filepath) you are making an HTTP request and the IP address in use will be the proper public IP address of the server instead of 127.0.0.1.

If that doesn't apply to you, then I'm not sure why this isn't working already.
__________________
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
Seek and you shall find... basically:
validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Rowsdower! is offline   Reply With Quote
Users who have thanked Rowsdower! for this post:
Mooseman (01-12-2013)