Skip to main content
Inspiring
December 3, 2017
Answered

htaccess and tidy url

Used this...

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME}\.html -f

RewriteRule ^(.*)$ $1.html

Pages connect both without the .html and with when typed into browser. However, when I use my nav menu links in the site.. they revert automatically to displaying the .html. How can I further modify to cover those internal menu links?

Thank you!

    This topic is closed to new replies. Start a new post to keep the conversation going.
    BenPleysier
    BenPleysierCorrect answer
    Community Expert
    December 4, 2017

    Instead of writing the link as

    <li><a href="contact.html">Contact</a></li>

    remove the extension as in

    <li><a href="contact">Contact</a></li>

    Again, I am only guessing at what you have done. Showing the complete code is much easier for us than a guessing game.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!

    1 reply

    BenPleysier
    Community Expert
    BenPleysierCommunity ExpertCorrect answer
    Community Expert
    December 4, 2017

    Instead of writing the link as

    <li><a href="contact.html">Contact</a></li>

    remove the extension as in

    <li><a href="contact">Contact</a></li>

    Again, I am only guessing at what you have done. Showing the complete code is much easier for us than a guessing game.

    Translate
    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!