Good day!
I want to make proper redirect by htaccess, when there is GET request like this:
example.org/directory/page/
It should give example.org/page.php
My htaccess lets only redirect this kind of request
example.org/directory/page
I use this config
#remove extension
RewriteRule ^([^\.]+)$ $1.php [NC,L]
#remove directory
RewriteRule ^directory/(.*)$ /$1 [L]
Thank you for attention!