Answer the question
In order to leave comments, you need to log in
What's wrong with RewriteRule in .htaccess?
I want pages like site.ru/page.php to be displayed like site.ru/page/
What's wrong with my .htaccess?
RewriteEngine on
RewriteBase /
RewriteRule /(.*).php /$1/ [R=301, L]
Answer the question
In order to leave comments, you need to log in
So it will transfer to /page/, but it will already be a folder.
So it will transfer to /page, it will be a file, but php will not start in it.RewriteRule (.*).php$ /$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question