Copy link to clipboard
Copied
Good day everyone!
How do you actually hide the .html extension from getting showed in the browser? I have seen that most of the websites have a professional look. Their pages are rendering without the .html or .php extensions. Can you do this in muse? Or you need to do it using a classic way. I actually found a method to do this. I added this code in the .htaccess file :
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
After this, I had to change all the links inside the html. Eg: if it linked to index/photos/photos.html , I changed the link to index/photos/ and it worked.
The question is: is there a way to do this directly with muse, without having to manually change all the links?
Thank you!
Hey,
Unfortunately, there isn't any direct way to deal with this.
The modification in .htaccess is the only way.
have a look at this tutorial - http://alexcican.com/post/how-to-remove-php-html-htm-extensions-with-htaccess maybe it has any simpler way of executing the code.
Regards,
Ankush
Copy link to clipboard
Copied
Hey,
Unfortunately, there isn't any direct way to deal with this.
The modification in .htaccess is the only way.
have a look at this tutorial - http://alexcican.com/post/how-to-remove-php-html-htm-extensions-with-htaccess maybe it has any simpler way of executing the code.
Regards,
Ankush
Copy link to clipboard
Copied
Thank you very much!