Redirect Error for Other than index.hmtl

Right now, you have .htaccess rules that redirect people from /products.html to /products. However, there is no file or directory named /products, and no code to route it to another file. So the server doesn’t have any code to handle /products.

If my assumptions are correct, you want people to see the page /products.html but use the URL /products? If so, then you’ll probably want an extra .htaccess line which looks something like this (untested):

RewriteRule ^products$ /products.html [NC,L]

Alternatively, there are .htaccess snippets which remove the file extension for all files all at once. Something like this:

8 Likes