引导地址栏

时间:2018-09-17 21:12:02

标签: html url-rewriting friendly-url

我已经用Bootstrap开发了一个网站,并在导航栏上使用了以下代码:

<nav class="navbar navbar-2 navbar-expand-lg p-0">
    <div class="container">

        <button class="navbar-toggler text-white" type="button" data-toggle="collapse" data-target="#navbarNav"
            aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="fas fa-bars"></span> Menu
        </button>

        <div class="collapse navbar-collapse text-white" id="navbarNav">
            <ul class="navbar-nav text-light">
                <li class="nav-item">
                    <a class="nav-link active-page" href="./index.html">Home</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#chiSiamo">Chi siamo</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="./servizi.html">Servizi</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="./realizzazioni.php">Realizzazioni</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="./tecnologie.html">Tecnologie</a>
                </li>
            </ul>
        </div>

    </div>
</nav>

现在,当我运行我的网站并将页面导航到浏览器时,我看到了以下内容: 本地主机:80 / Contatti.html或本地主机:80 / chiSiamo.html。

如何仅显示不带.html扩展名的名称页?

示例: localhost:80 / Contatti

谢谢

0 个答案:

没有答案