weixin_33724570 2017-04-18 07:37 采纳率: 0%
浏览 15

为什么我们使用.htaccess文件? [重复]

This question already has answers here:
                </div>
            </div>
                    <div class="grid--cell mb0 mt4">
                        <a href="/questions/13170819/what-is-htaccess-file" dir="ltr">What is .htaccess file?</a>
                            <span class="question-originals-answer-count">
                                (8 answers)
                            </span>
                    </div>
            <div class="grid--cell mb0 mt8">Closed <span title="2017-04-18 10:15:58Z" class="relativetime">3 years ago</span>.</div>
        </div>
    </aside>

I am creating small data entry software using php with ajax code. But I didn't create .htaccess file. I have one doubt. must we create .htaccess file ? why we create .htaccess file. Please suggest.

</div>
  • 写回答

2条回答 默认 最新

  • weixin_33681778 2017-04-18 07:40
    关注

    A .htaccess file is not mandatory. It has many uses and if there is a specific need, you have to use a .htaccess file. If not, you can ignore it.

    For example with .htaccess you can do redirections, you can do authentication with username and password, you can restrict specific directories and many more uses.

    In your case, if your needs dont forward you to the use of .htaccess, just dont use one. Although most websites nowadays have at least 1 need that .htaccess covers.

    评论

报告相同问题?