Answer the question
In order to leave comments, you need to log in
Why do two conditions conflict in .htaccess?
good afternoon.
Why do these 2 conditions conflict with each other?
# вторая часть (делает редирект для *.php)
RewriteCond %{REQUEST_URI} ^(.*)\.php$
RewriteRule ^(.*)\.php$ $1\/ [L,R=301]
# третья часть (site.ru/*/ открывает как site.ru/*.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)(\/)$ %{REQUEST_FILENAME}.php [L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question