-
Remove extension
Hello,
I have tried removing the website extension but it never seems to work.
example.com/sub.HTML, how would i remove the .html part?
I have tried making a .htaccess file and put this in but it doesn't change anything
HTML Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Any ideas? thanks in advance
-
You need RewriteBase /, so try:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Bye!
-
Quote:
Originally Posted by
alemoppo
You need
RewriteBase /, so try:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Bye!
I have tried what you said, but it still doesn't seem to work. Is there any other way to do this?
-