Answer the question
In order to leave comments, you need to log in
How to give a file with an extension using htaccess, and display it in the URL without an extension?
There is a site on pure html.
All articles are in the root of the site, and the categories are in folders.
site.com - папка категории - index.html (то есть страница категории)
site.com/category/index.html
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) $1.html [L]
display: block Created a file with your content, and something doesn't work very well. .html changed to .php
at the root there is a style fam.css
news news.php
if I access site/fam then styles open, and if site/news then 404. Having added the extension, everything is fine. what am I doing wrong?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question