Streaming live at 10am (PST)

Remove or add HTML extension to a link


#1

Hi,

It would be a good feature to remove or add HTML extension to a link: think search engine friendly.

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

How to remove .php, .html, .htm extensions with .htaccess by Alex Cican.


#2

Hi,
It's interessting but I have a same kind question.
With webflow I create a website with a menu bar.
But as I'm using php code on some pages, my website needs php extension instead of html.
The problem is my menu...
Webflow, when I export the website, is giving a html extension to all page.
It means I have to manually replace html extension on all links and on every page manually by php.

So, my question is : is it a way to redirect ex: link1.html to link1.php with a .htaccess ?

I hope you can understand my english and give some explanation...


#3

Hi @Frvsens,

Is that post has solved your problem ?


#4

Hi Thierry,
Nope....

I dont want remove the extension, I want that all links .html clicked are redirect to a php extension.

Any suggestion ?


#5