Aug 8, 2008

Path To /.htaccess Folder?

Free Web Hosting, No Ads > General > Hosted Members Area

free web hosting

Path To /.htaccess Folder?

Sharn
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?

Reply

jlhaslip
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. smile.gif

Reply

Sharn
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. smile.gif

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. smile.gif

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. activate htaccess for a folder - 12.96 hr back. (1)
  2. ren imagesimages.{21ec2020-3aea-1069-a2dd-08002b30309d} - 175.05 hr back. (1)
Similar Topics

Keywords : path, htaccess, folder

  1. Folder View In Kde 4.1
    (3)
  2. Tutorial : Hide Folder Without Any Softwares
    Descriptive enough! (10)
    It's easy, just a few steps and your folder will be hidden First step : Create folder, name it
    using alt+0160 Second : A folder will be created with name 1 space, then right click the folder,
    properties, customize, change icon, see for a blank icon and press apply Enjoy Video tutorial
    uploaded by me http://www.youtube.com/watch?v=EW8dD3KeUJk Have fun.....
  3. 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....
  4. .htaccess
    (3)
    How do I make subdomains using a .htaccess file? Like "Example.Domain.com" I remember I was able
    to make a .htaccess file with some stuff in it that allowed it to do it, but I dont remember how.
    any help would be appreciated =)....
  5. Cakephp On Ubuntu
    using your own public_html folder (0)
    Hi, there are many tutorials about this, but i would like to type the steps i followed in order to
    get cakephp working on my user public_html folder. as many of you probably know, if you have
    apache's userdir module loaded, you can put your web pages on /home/user/public_html , and
    access them with the url: http://localhost/~user/ . I really prefer this, so all my web pages are
    on my personal home, but how to configure cakephp to work with these paths, i got a hard time with
    this, but finally got it!. here's how: in case you don't have apache2's u....
  6. Best Way To Lock A Folder Without Using An Application
    (13)
    Steps: 1- make a new folder ( name it as you like ) 2- inside this folder make a (.TXT ) file &
    copy the following inside it: CODE Quote: cls @ECHO OFF title Folder Private if EXIST
    "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Private goto
    MDLOCKER :CONFIRM echo Are you sure you want to lock the folder(Y/N) set/p
    "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N
    goto END echo Invalid choice. goto CONFIRM :LOCK ren Private "Control Panel.{21EC2020-3AEA....
  7. Image Calling Problem Solved
    I was having issues trying to call an image from a folder. (1)
    Alright so this is for example You'd have a site and the structure is like this.
    http://www.url.com/ a folder of images /images/ and some pages in this parent directory. However,
    I have another folder so it's http://www.url.com/other/ and this index page needs to call
    things from http://www.url.com/images/ and it can't. It won't load. I've had the
    call be to CODE <img src="images/" or <img src="../images/" and
    <img src="http://www.url.com/images/" It doesn't work. I can't....
  8. Special Characters In The Web Address
    help nedded for using special characters in the path and then usin the (0)
    hi i am new to htaccess. i was trying to write a rewrite rule in the htaccess for utilizing
    special characters but was unsuccessful...... cud pl anyone help me out working out the same.....
    here's it i a trying to rewrite the following url CODE
    http://www.example.com/*service:forums|passive:true as CODE
    http://www.example.com/index.php?service:forums|passive:true the code i added in
    htaccess was...... CODE Options +FollowSymlinks RewriteEngine on RewriteRule
    ^\*(.+)$ index.php?$1 [nc] ....
  9. /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.....
  10. What Is The Cgi-bin Folder Used For ?
    (4)
    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.....
  11. How To Add An Application To The Right Click On Every Folder
    this demostration will show you Add an Application to the Right Click (2)
    Here is how to add any application to the Context Menu when you right click on any Folder. This way
    you do not have to always go to the Start Menu. When you right click on any folder, you can have
    access to that application, the same as using Sent To. 1. Open RegEdit 2. Go to
    HKEY_CLASSES_ROOT\Folder\shell 3. Add a new Key to the "Shell" Key and name it anything
    you like. 4. Give it a default value that will appear when you right click a folder, i.e. NewKey
    (use an "&" without the quotes, in front of any character and it will allow you to use the keyboard)....
  12. My Site Is Showing Trap17 Activation Page Only [resolved]
    my forum is not showing with www path (2)
    Hello I have requested for the free hosting with my own domain name and everything is in orderbut i
    am having this proble and here goes each time i type www.mysite.com instead of me seeing the home
    page of my site what i will be seeing is the default trap17 page where it will tell the visitor
    welcome to trap17 web hosting this domain is hosted with trap17 i have deleted the page creat my own
    index page but still i am seeing this page now agian each time i type www.mysite.com/yabb.pl that is
    the direct link to my forum script it wont open instead it will tell me can not f....
  13. 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" em....
  14. Dynamic Signature - Yet Another Way To Do It
    Create dynamic sigs for multiple users using .htaccess and RewriteRule (0)
    Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
    some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
    updated my Winamp playlist, and several other interesting things... Then, I figured I could create
    an image, and display all that info, and show it on forums, as a signature... And I made a great
    PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
    http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ....
  15. Windows Ntfs Folder And File Compression. Good Or Bad?
    (6)
    I believe everyone in this forum knows what a file system means and that every windows user knows
    what FAT and NTFS means so I am not gonna start going into those. Well, the NTFS (Windows NT file
    system) offers a few advantages over the good ol' FAT (File allocation table) file system one of
    which is the files and folders compression. This I have done quite a number of times to save disc
    space (and it really does save some disc space). i am using my computer as an example here. Consider
    my 35GB partition which is carrying my Windows Vista Operating sys and has less ....
  16. Con Named Folder
    (3)
    Hello all, try to create a new folder and rename it to 'con' I've tried to do that but
    it won't name it with this name... anyone here knows why? I want a folder with 'con'
    name /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> /wacko.gif"
    style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />....
  17. .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.....
  18. How To Disable "show Hidden Files And Folders" In Folder Option
    (11)
    How to disable "Show hidden files and folders" in Folder Option As you know, you can hide files
    or folders in Microsoft Windows ( to hide a file or folder , right click on file or folder >select
    properties and then select Hide file) But if you open Folder Option and check "Show hidden files
    and folders " you can see hidden files. to disable "Show hidden files and folders" feature follow
    below steps : 1- Click start > Run > type regedit to run Windows Registry Editor. 2- Go to following
    address: QUOTE HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/Current Versio....
  19. I Need A Hand With Some Htaccess Login Stuffs!
    (0)
    QUOTE Hi all. Im currently trying to get a htaccess/htpasswd login system to work. Its
    extremely basic, just one username and one password. my htaccess code is as follows: CODE
    AuthType Basic AuthName "Login" AuthUserFile
    "/home/MYUSERNAME/public_html/***/***/.htpasswd" require valid-user obviously the stars
    mask the real directory My testing code for my password file which is located in the above
    directory is as follows: CODE login1:login2 login2 is the password and im fairly sure i
    got the syntax right "username:password" is....
  20. What Do You Prefer? A Subdomain Or A Url With A Folder Name?
    (16)
    Hi everyone, please see the poll and respond! Let me elaborate here, say if there was a
    website, the url itself was around 6 or 7 letters long such as trap17.com, that sort of length, now
    would you prefer to see a subdomain on this site, such as sub.site.com or have a folder name in the
    URL like site.com/sub, I want the URL to be as easy to remember and as catchy as possible and im not
    sure which method would give the best results here. In line with my last post i would appreciate
    any links to a website where i can find information like this. But please respond to....
  21. Can't Delete A Folder On Server!
    a small mistake in a script.... (7)
    I maintain my college's website and since I update it frequently, I decided to
    write a php script that would backup all the data in a folder on the server itself. To backup all th
    e data I would only need to run the script once in a while: function dircpy($basePath,
    $source, $dest, $overwrite = false) { print
    "============================================================================ ";
    if(!is_dir($basePath . $dest)) mkdir($basePath . $dest);
    if($handle = opendir($basePath . $source)) {....
  22. What Is The Board Path
    (2)
    I am trying to install an ipb cms, and it asks for a board bath in the config.php file. I entered
    gta-source.net and I got this huge error. So what is the real board path i need to enter?....
  23. 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: ....
  24. 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....
  25. How To Delete Uploaded Picture From A Folder
    (1)
    i wrote some code to upload the pictures to a folder and after it has uploaded, there's a page,
    say pics.php.. it displays all pictures of the folder to that page. now i want to add an option to
    delete the pictures. for example i want to add a link "Delete" under every pic, that when i click it
    deletes the pic from the folder and deletes the pic data from mysql. How i can delete the pic from
    the folder? thanks ....
  26. Make A Folder Named Con
    you can never do that (6)
    an interesting thing that you never exprienced it@ try to create a file or folder named con in
    windows! you will never be succed to that! and also you are not able to make these names
    too!!!!:D con nul lpt1 lpt2 lpt3 com1 com2 and com3 !!!: /biggrin.gif"
    style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />:D you have prize if you
    make a folder named them!:D but you can use this option to lock your cd(s) !!:
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />:D you ca....
  27. How To Lock A Folder And Keep It Private
    title explains it (14)
    okay people i had a member ask earlyer how to lock folder and or a file and i had the answer, and i
    though to my self after i had written it maybe everyone may need to do thsi so ill post it into a
    tutorial, okay so i wrote this for someoneelse earlyer and am posting it here for all to see: you
    dont need software to lock a folder or add a password to a folder right okay this is my little
    tutorial on how to lock a folder, here we go first things first you need a random folder or the
    folder you wish to lcok then put what ever you want to lock into the folder, then right c....
  28. Try To Make Con Folder In Microsoft Os
    Reason why u cant make some folder names in win os (7)
    Guys try to make con folder in win os can u??? yes ??? no??? Answer is No, bcoz their few names
    /ohmy.gif" style="vertical-align:middle" emoid=":o" border="0" alt="ohmy.gif" /> CON, PRN, AUX,
    CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4,
    LPT5, LPT6, LPT7, LPT8, LPT9 can be more too. are all Windows reserved device names from the early
    days of DOS. i tried this in CMD "mkdir \\.\c:\CON" This will create CON folder
    in e: drive. u will Reply from OS The directory name is invalid. Try if u get succe....
  29. 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. ....
  30. How To: Change Your Website's Index File
    a simple trick using .htaccess (18)
    How To: Change Your Website's Index File a simple trick using the .htaccess file A simple
    tutorial which only involves editing one little file. Useful for those of us who have mime-typed
    extensions or who are creating lots of test design files and want an easy way to make the design
    they like best their default file. Create a file called .htaccess in the /public_html/ folder if
    you don't have it. I think one should be there already when you get your site so if it isn't
    you should create it anyway! In the file write the following: CODE Di....

    1. Looking for path, htaccess, folder

Searching Video's for path, htaccess, folder
Similar
Folder View
In Kde 4.1
Tutorial :
Hide Folder
Without Any
Softwares -
Descriptive
enough!
How Do I
Acces My Www
Folder And
More?
.htaccess
Cakephp On
Ubuntu -
using your
own
public_html
folder
Best Way To
Lock A
Folder
Without
Using An
Application
Image
Calling
Problem
Solved - I
was having
issues
trying to
call an
image from a
folder.
Special
Characters
In The Web
Address -
help nedded
for using
special
characters
in the path
and then
usin the
/tmp Folder
In File
Manager
What Is The
Cgi-bin
Folder Used
For ?
How To Add
An
Application
To The Right
Click On
Every Folder
- this
demostration
will show
you Add an
Application
to the Right
Click
My Site Is
Showing
Trap17
Activation
Page Only
[resolved] -
my forum is
not showing
with www
path
Site
Management
Tools: Look
Before You
Leap! -
The danger
of using
Index
Manager and
other
.htaccess
altering
tools..
Dynamic
Signature -
Yet Another
Way To Do It
- Create
dynamic sigs
for multiple
users using
.htaccess
and
RewriteRule
Windows Ntfs
Folder And
File
Compression.
Good Or Bad?
Con Named
Folder
.htaccess
Problem -
how to
allow?
How To
Disable
"show
Hidden Files
And
Folders"
; In Folder
Option
I Need A
Hand With
Some
Htaccess
Login
Stuffs!
What Do You
Prefer? A
Subdomain Or
A Url With A
Folder Name?
Can't
Delete A
Folder On
Server!
- a small
mistake in a
script....
What Is The
Board Path
Ftp 550 -
Permission
Denied
[resolved] -
When I try
to delete a
folder
Problem
Removing
Folder On
Ftp
How To
Delete
Uploaded
Picture From
A Folder
Make A
Folder Named
Con - you
can never do
that
How To Lock
A Folder And
Keep It
Private -
title
explains it
Try To Make
Con Folder
In Microsoft
Os - Reason
why u cant
make some
folder names
in win os
Cannot
Delete
Folder After
Lost Ftp
Connection -
permission
not given to
delete file
How To:
Change Your
Website'
s Index File
- a simple
trick using
.htaccess
advertisement



Path To /.htaccess Folder?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE