| |||||||
This is a discussion on What are .htaccess files? within the PHP/MySQL section, part of the Programming category; Hi all What are .htaccess files in PHP?What is the use of it? can I made it myself or download ...
![]() |
|
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
|
Hi all What are .htaccess files in PHP?What is the use of it? can I made it myself or download it from anywhere? Thanks |
|
#2
| ||||
| ||||
|
hai jeetu welcome to tech 555 ![]() .htaccess (hypertext access) or ( "distributed configuration files") is the default name of directory-level configuration files that allow for decentralized management of configuration when placed inside the web tree. I think link below will be usefull to you to know more .. http://httpd.apache.org/docs/1.3/howto/htaccess.html Regards Spec_tray
__________________ " There are no failures - just experiences and your reactions to them. New members Please read before u post General Tech6 Rules !!! CSS Validator | Markup Validator | RSS Validator |
|
#3
| ||||
| ||||
As Said by jeetu You can view/edit it through any FTP client, I recommend WinSCP. .htaccess is hidden (this is what the . symbol indicates) so you'll have to enable viewing of hidden files. For example, at this site we are using .htaccess for redirecting all visitors from www to non-www version of the site. We are also using it to password protect important directories (my favorite feature). All URL rewrites are done via .htaccess Also note that htaccess is a directory-level config file for most webservers that includes Apache, litespeed etc. AFAIK there's no such term as htaccess for nginx webserver (which is gaining popularity rapidly), you instead put all rules directly in nginx.conf file and it has its own syntax.
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#4
| ||||
| ||||
|
I think it's important to also note that two things not mentioned here: *IF* you have a dedicated server, or root access to your server, then it's always preferable to put your rules and instructions in the server's httpd.conf file (for performance reasons; in fact, there are some references to this in Apache's documentation) Also, the files do NOT have to be called .htaccess (this is just the conventional name). I don't use .htaccess for the simple reason that everyone expects to find your web configuration here. And one of the first rules of security is that the less they know, the less they can do. Again, you probably need root access for this (such as on a dedicated server), but I'd suggest using a different naming method (you update this in Apache's config files). This enables to draw much less attention to these files, since they can contain sensitive information. |
|
#5
| ||||
| ||||
As Said by SikoSoft
__________________ Would you like to Link To Us | Support TECH6 by going Premium Know more about me at Vinayaks.com | Follow TECH6 at Twitter |
|
#6
| ||||
| ||||
As Said by SikoSoft HTML Code: <Files .htaccess> order allow,deny deny from all </Files> |
|
#7
| ||||
| ||||
|
A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. The original purpose of .htaccess - reflected in its name - was to allow per-directory access control, by for example requiring a password to access the content. Nowadays however, the .htaccess files can override many other configuration settings including content type and character set, CGI handlers, etc. These files are placed inside the web tree, and are able to override a subset of the server's global configuration for that directory, and all sub-directories.
__________________ quang cao nha dat |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |