SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could someone explain to me what can I do with .htaccess file, how to make this file and how to use it? I want to secure my web pages from which I have access to MySql database.

    Thanks
    Mare

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From http://www.apache.org/docs/configuring.html:

    .htaccess Files
    Apache allows for decentralized management of configuration via special files placed inside the web tree. The special files are usually called .htaccess, but any name can be specified in the AccessFileName directive. Directives placed in .htaccess files apply to the directory where you place the file, and all sub-directories. The .htaccess files follow the same syntax as the main configuration files. Since .htaccess files are read on every request, rather than only at server startup, changes made in these files take immediate effect.

    To find which directives can be placed in .htaccess files, check the Context of the directive. The server administrator further controls what directives may be placed in .htaccess files by configuring the AllowOverride directive in the main configuration files.

    It's a text file.

  3. #3
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anarchos you could have just refered the poor soul to the apache manual.

    If my memory server me right that is the exact description Apache gives of the .htaccess files in the official manual.

    and by the way the manual for apache may be found at http://httpd.apache.org/docs/ you may however find this a little over whelming at first.
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  4. #4
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the .htaccess file, you can do many things like setup a custom error page, change your default page extension, etc.

  5. #5
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by mjames86
    With the .htaccess file, you can do many things like setup a custom error page, change your default page extension, etc.
    How can I change my default file to index.php? Now it's index.html.

    Mare

  6. #6
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mad Onion: hence the "From http://www.apache.org/docs/configuring.html: "

  7. #7
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by mad-onion
    Anarchos you could have just refered the poor soul to the apache manual.

    If my memory server me right that is the exact description Apache gives of the .htaccess files in the official manual.

    and by the way the manual for apache may be found at http://httpd.apache.org/docs/ you may however find this a little over whelming at first.
    He did do that...

    BTW, I have found the apache manual to be very confusing...I wish someone would make a userfriendly site supporting apache.

  8. #8
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know what you mean Nate, it is like one big fat unorganised compilation of information.

    There would appear to be little or no logic to its layout.

    Perhaps that could be an idea for improvements on the nextr release.

    Just imagine it...


    Apache 1.3.6.13
    Major Updates:
    - New Manual Layout


    kinda funny really
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  9. #9
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, yea that would be good

  10. #10
    SitePoint Enthusiast swoosh's Avatar
    Join Date
    Aug 2000
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been browsing around and managed to get to this interesting tutorial about .htaccess file: http://www.coolresources.com/article...d/htaccess.htm. mh8759, the tutorial can explain how you can change your default file from index.html to index.php. And jumpthru, I think the site is more user-friendly, too. Hope that link also helps others who want to know a bit more about the .htaccess file.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •