Sharn
Nov 15 2006, 09:53 PM
| | Well - I'm trying to set up .htaccess for a password to a file on my site, but I can't login with the user and pass I gave. I think it's cause I don't have the whole directory. I'm using this site: http://www.tools.dynamicdrive.com/password/
This is my .htaccess:
AuthName "Restricted Area" AuthType Basic AuthUserFile /.htpasswds/.htpasswd AuthGroupFile /dev/null <Files submit.php> require valid-user </Files>
I noticed the htpasswds directory when I was looking around. I expect that is what it's for, right? Anyhow, does anyone know the path I need to use this? |
Comment/Reply (w/o sign-up)
jlhaslip
Nov 16 2006, 05:19 AM
From your cpanel, perform a phpinfo and the _SERVER["DOCUMENT_ROOT"] should show up under the php variables down near the bottom of the page. Mine is : "/home/jlhaslip/public_html" "jlhaslip" is my cpanel user-name, so I assume the root folder of my account is "/home/jlhaslip" and that is where I think the .htaccess file belongs for what you want to do. The path to the file you want to protect will depend on exactly where is resides in the file system for your account. If you can tell where it is relative to the public_html, then you should be able to combine the info above with the known path to the file.
Comment/Reply (w/o sign-up)
Sharn
Nov 16 2006, 05:30 AM
QUOTE(jlhaslip @ Nov 15 2006, 10:19 PM)  From your cpanel, perform a phpinfo and the _SERVER["DOCUMENT_ROOT"] should show up under the php variables down near the bottom of the page. Mine is : "/home/jlhaslip/public_html" "jlhaslip" is my cpanel user-name, so I assume the root folder of my account is "/home/jlhaslip" and that is where I think the .htaccess file belongs for what you want to do. The path to the file you want to protect will depend on exactly where is resides in the file system for your account. If you can tell where it is relative to the public_html, then you should be able to combine the info above with the known path to the file.  Ahhhh, yes. EXACTLY what I was looking for. Thanks a whole lot, Haslip. I need to post a big reminder somewhere that says PHPINFO. Rofl. 
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : path, htaccess, folder
- Fileop Failure On A Folder
On cPanel (6)
Is Wildcards Allowed In Htaccess?
Requesting help (0) Can we use wildcards for file names in htaccess? What I mean is whether we can denote a file paths
name to something like "/myweb/myfile-*.html" so that we ask the server to process any file with the
name "myfile-COMPLETENAME.html"? Still didn't get the point? Consider a link linking to
something like "/folder/". When a link like this is opened it will search for index.html or
index.shtml and so on. To override this default behaviour we use the following code in servers
.htaccess file: CODE DirectoryIndex index.html article.html With this the server first s....
How Do I Acces My Www Folder And More?
(10) Guys i want to change my WWW but im not sure how to do this i would be happy if anyone helps me also
i have a mySQL created by navicat and i want to upload that so like ppl from my site can make
account on my mySQL PLZ help me i would be really happy....
/tmp Folder In File Manager
(4) I know awhile back there was a question brought up about the /TMP folder taking up space, and if
anyone remembers that topic do you remember if TMP was an acronym for temporary, and can you safely
delete the contents in that folder? Right now I am cleaning out my hosting account and the files in
that folder are the only ones taking up space at the moment.....
What Is The Cgi-bin Folder Used For ?
(7) I have a quick question for you guys, I noticed that in CPanel, there is a cgi-bin folder under the
www folder, and there is a cgi-bin folder that's created for every subdomain I have. What is
this cgi-bin directory suppose to be used for ? And is it safe to just delete it ? Thanks in
advance.....
Site Management Tools: Look Before You Leap!
The danger of using Index Manager and other .htaccess altering tools.. (3) A few minutes ago I was looking at site management tools section in my Control Panel. The tool
"Index Manager" caught my eye. If I used it, then I wouldn't need to create placeholder pages in
my folders with no index pages /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
alt="smile.gif" /> What I had forgotten is that I already had an .htaccess file in my site.
Needless to say, enabling this option took down my whole site instantly and displayed an "Internal
Server Error" message. How stupid of me! /wacko.gif" style="vertical-align:middle" emoid=....
.htaccess Problem
how to allow? (2) Order Allow,Deny Order Deny from All How do i change this to allow? I tried Order
Allow,Deny Order Allow from All That didnt work so how do i do it? By the way i have read
the support forum and i couldnt find anything.....
Ftp 550 - Permission Denied [resolved]
When I try to delete a folder (7) I installed a plugin and then I removed it from the ftp, but it seems their created folder is still
in my directory. When I try to remove it, I got a FTP 550 Permission denied error, how can I fix
this? I believe it is causing some problems with my other plugin. Also what is the default
permissions for any file? Can I set them to be a certain permission level, because I need them to be
able to execute. Here is the screenshot: ....
Problem Removing Folder On Ftp
(6) hello i've been trying to remove a folder on my ftp location here at trap17 but it doesn't
seem to do anything at all if an admin or anyone else who has the capabilities can remove it,
i'd be gratefull the foldername is XD-RedZone....
Problem With Htaccess (i Guess)...
(0) So here we go: I use htaccess rules to have SEF url`s on my site..here`s my htaccess file: QUOTE
ForceType application/x-httpd-php ForceType application/x-httpd-php ForceType
application/x-httpd-php ForceType application/x-httpd-php And I have those files (quiz,
tour, logout etc) in my root ...according to the htaccess file, those files will be parsed as php..
The urls are like: hts.trap17.com/tour/signup , for example here`s the content of one of that
files: QUOTE $url=$_SERVER ; $url=explode('/',$url); $req=$url ; include("index.....
Which Folder
a noob question (4) On which folder should I upload all my website page files? there are lots of folders like www,
public_html, public_ftp, etc, which one?....
Renaming Your Url's
Can you use htaccess? (3) I was wondering if you could change and example link, http://frugoproductions.com/ index.php?n=
pages/videos into something like http://frugoproductions.com/pages/videos(.php) or something
easier for visitors to find the page. I'm looking at URL rewriting, but I am unsure if this can
solve me problem. It can be seen at http://www.webhostauditor.com/articles/url_rewriting.shtml
I'm not sure if the URL rewriting is the same, because, when it has ?n= it usually means
something like it takes the index page's templete and uses it for the pages that can be ad....
Public Hmtl Folder And Www Folder
Something is wrong with the ftp (9) My website has been running fine until a few days ago. First thing i notcied was i made all my nav
buttons rollovers and when i uploaded then via ftp the only one that changed was the home page
".../home.html" Then whenever i tried to upload anything else it wouldnt work. It says its
uploading, but dosnt. I did all this uploading into the public html folder. Then after getting
worried that i will not ever be able to update my site i tried one last place the www folder. What
is that folder? It works when i upload stuff and the pages work now, but why and what is this fold....
.htaccess File In Hosting Space Modification
what happens if i modify it? (5) hello guys!... i just installed from fantastico joomla and i while i was installing it, it prompt me
if i wish to install it on the root directory i should delete the .htaccess that is there, my
question is, what happens if i delete the file located there or if i replace the file? Is it going
to damage my site, the login or something? Title modified. ....
Cannot Delete Folder After Lost Ftp Connection
permission not given to delete file (7) hello, well i had created a subdomain and was transferring files into the folder i was disconnect
from the server many times while uploading the files via ftp once when i reconnect, i saw a file
with an unusual name something starting with preftp... i tried deleting the file, but it said that
permission was not granted to do that i tired deleting the complete folder and also tried deleting
the subdomain from the cpanel but it was of no use can anyone help me with this? thx for your time
Modified topic title. ....
Public_html Or Www Folder?
Where to put web files? (5) heh..im kind of new to this..but where to i put my pages that i want to show up? like in...
public_html www ??? plz help hehe Naming your topic title carefully would and will help
other members in the future. Please take topic title and description seriously. ....
Htaccess To Block Bots
How do you block bots and spiders? (7) I am curious about how to block the bots and / or spiders from accessing my subdomain. I believe
that I may have one using a terrible amount of Bandwidth. Is this possible? and how do I stop it?....
Which Folder..
a lot of folders in my accoutn already.. (3) Hallo guys, /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> i logged
into my ftp account useing smartFTP program (preety good btw). I see a lot of files and folders in
my account already, but puzzeled to which one to upload my site into and what all teh other folders
and file really does? In mine account right now there are: FOLDER: .fantasticodata mail
public_ftp public_html tmp www FILES: .contactemail .contactsavetime .lastlogin index.html All
those files and folders were there before i uploaded anything to my space. Which folder do....
Need .htaccess Help
Internal server error (1) Initially my .htaccess file looked like this: QUOTE # -FrontPage- IndexIgnore .htaccess */.??*
*~ *# */HEADER* */README* */_vti* order deny,allow deny from all allow from all order
deny,allow deny from all AuthName www.beeseven.trap17.com AuthUserFile
/home/beeseven/public_html/_vti_pvt/service.pwd AuthGroupFile
/home/beeseven/public_html/_vti_pvt/service.grp Then I tried adding a few things, and I got an
internal server error. QUOTE Content-Type: text/html; charset=utf-8 Content-Language: en
ErrorDocument 403 /403.shtml ErrorDocument 404 /404.shtml A....
Folder Max Size.
(3) Is there a way to restrict a folder max size or restrict uploading size to a certain folder from a
public user? Like when the folder for guest to upload reach a max size of 500kb, it stops and doesnt
allow anymore uploading to the folder.......
Is .htaccess Allowed ?
as the topic (2) is mod rewrite allowed in trap17 server ? coz i need to change my dynamic page into a static url .
thx....
Moving the contents of a folder
PHP nulke installed there... (2) I want to move all the contents of a folder to another folder as I have pointed a domain to the new
folder. Actually PHP nuke is installed in the folder that I want to move. What is the method to
move? Is it as tedious as downloading everything to my PC and uploading again to the new folder, or
is there a simpler method? If I move everything, will the SQL connection stay? or will it go
beeping??? Thanks Googlue!....
Looking for path, htaccess, folder
|
Searching Video's for path, htaccess, folder
See Also,
|
advertisement
|
|