Highlighted

htaccess and tidy url

Enthusiast ,
Dec 03, 2017

Copy link to clipboard

Copied

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!

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

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.

Views

168

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

htaccess and tidy url

Enthusiast ,
Dec 03, 2017

Copy link to clipboard

Copied

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!

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

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.

Views

169

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 03, 2017 0
Adobe Community Professional ,
Dec 03, 2017

Copy link to clipboard

Copied

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.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 03, 2017 0