Well hello,
I have read quite a lot about .htaccess and it's featres but i do not completely understand how to use it...
If i wanted to put restrictions on user ip address and let the rest of the world be able to view it how would i ?
Well hello,
I have read quite a lot about .htaccess and it's featres but i do not completely understand how to use it...
If i wanted to put restrictions on user ip address and let the rest of the world be able to view it how would i ?
I really DON'T mind havin help![]()
add the line to the .htaccess with i.p. address, or domain name, or both:
Also if you want a completely private folder or file addCode:deny from 71.11.141. deny from google.com
If you are doing this, this really should be all you are having in your .htaccessCode:Deny from all![]()
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Is that all there is to it ?
What connects the file itself to the server (is it automatic) and does the htaccess file apply its "script" to anything below it's directory...
You will need to place the code that Blizzard posted above in a file named .htaccess (nothing else), and place that in the directory you wish to protect (or limit access to).
Hope this helps.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
And yes, that is it. Where ever the .htaccess file is everything below that level will be affected.
If you want to keep someone off your site all together put it outside the root folder.
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Yes - thanks,
But just wondering how do you put the htaccess file above the root ?
With most webhosts, your root directory is above your www folder (or public_html, or document root). Simply place the htaccess file above that.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
So what your saying is that i can in my account put a folder called www and before that put the htaccess file...
no, the www folder (oftentimes called public_html or just root) should already be there.
This is the folder that you upload all your web pages and images and crap into that you want everyone to see when they go to youdomain.com.
through an FTP client or your webhosts admin panel you will be allowed to go one folder up from this directory. place the .htaccess there.
You can also put it just inside the root folder, but there are some that can bypass it when it is on this level.
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Bookmarks