htaccess介绍和使用方法 |
发布时间: 2012/8/9 15:16:22 |
htaccess文件是非常有用的,下面一篇介绍:
• Part 1 – Introduction介绍 • Part 2 - .htaccess Commande命令 • Part 3 - Password protection密码保护 Part 1 – Introduction介绍 Introduction 介绍 In this tutorial you will find out about the .htaccess file and the power it has to improve your website. Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file. 从本指南中,您可以学习到有关.htaccess文档及其功能,用以优化您的网站。尽管.htaccess只是一个文档,但它可以更改服务器的设置,允许您做许多不同的事情,最流行的功能是您可以创建自定义的“404 error”页面。.htaccess 并不难于应用,只是在一个text文档中添加几条简单的指令而已。 Will My Host Support It? 我的主机支持它吗? This is probably the hardest question to give a simple answer to. Many hosts support .htaccess but don't actually publicise it and many other hosts have the capability but do not allow their users to have a .htaccess file. As a general rule, if your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it. 这可能很难用简单的答案来回答。许多主机支持.htaccess但实际上并不会明确声明,许多其他类型的主机有能力但并不允许他们的用户使用.htaccess文档。作为一般性的规则,如果你的主机使用Unix或Linux系统,或任何版本的Apache网络服务器,它一般来说是支持.htaccess的,尽管你的主机服务器可能不允许你使用它。 A good sign of whether your host allows .htaccess files is if they support password protection of folders. To do this they will need to offer .htaccess (although in a few cases they will offer password protection but not let you use .htaccess). The best thing to do if you are unsure is to either upload your own .htaccess file and see if it works or e-mail your web host and ask them. 本文出自:亿恩科技【www.enkj.com】 |