Htaccess rewrite rule problem

i have created a website http://john33.000webhostapp.com/index.html i wanted the url become /index by removing .html
i used the code rewriterule^([^.]+) $$1.html[nc,l] and pasted it in .htaccess file.when i was opend my website it showing application error please help

# 000webhost Run HTML without filename extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html

Maybe? :slight_smile:

https://john33.000webhostapp.com/johnson1

Obviously you’ve coded your links to .html

So you can leave them as is, or update the coding to reflect /johnson1 instead of /johnson1.html etc

This topic was automatically closed after 10 hours. New replies are no longer allowed.