Answer the question
In order to leave comments, you need to log in
Is it possible to write the perfect .htaccess?
Hello
There is a site without CMS. The SEO specialist wants to bring it to the top
. To do this, he asks to convert pages like mysite.ru/set.html into mysite.ru/set.
The fact is that my site is without a CMS and you need to write the code manually, no problem.
index.html and set.html are in the same folder.
When trying to write a standard .htaccess error 403 occurs.
Dear experts, is it possible to write a perfect .htaccess for SEO?
Answer the question
In order to leave comments, you need to log in
Firstly, he says nonsense, if you had:
mysite.ru/446782.php?id=6&name=8&date=9
then yes, but with and without html - this is the same from the point of view of SEO
In general, even on the site without CMS it is possible to do routing, do you have traffic now? Because it will be necessary to set redirects and in short you will lose it most likely for a while if you change the addresses.
In principle, you were rightly told about the nonsense about search engine optimization and file permission, but if you want to have it purely aesthetically without .php and .html, then here's a simple syntax.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question