Answer the question
In order to leave comments, you need to log in
How to remove PHP to put a slash in a separate folder?
Hello!
Please help, I can't find a solution.
It is required for all files of the /forum/ directory with the php extension to remove php and put a slash.
That is,
redirect all files https://www.site.ru/forum/forum12/topic2401.php to https://www.site.ru/forum/forum12/topic2401/
Found solutions for the entire site, but then all files are redirected , and I only need in this directory /forum/. There is no physical directory.
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/forum/.+\.php$
RewriteRule ^(.+)\.php /$1 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question