How to create .htaccess rule?

0 like 0 dislike
126 views
I have in the file .htaccess there is a rule

RewriteRule ^(.*)?$ material/ru.php [QSA,NC,L]
It sends all non-existing pages of the form site.ru/123456 at material/ru.php

How to make the same rule but not for existing pages with addresses:

site.ru/view/123456 to these addresses are processed the rule is different from

RewriteRule ^(.*)?$ material/ru.php [QSA,NC,L]
and open the following address material/en.php

Thank you!
by | 126 views

1 Answer

0 like 0 dislike
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^view/ material/en.php [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ material/ru.php [L]
by

Related questions

0 like 0 dislike
1 answer
asked Aug 17, 2019 by 9StarRu
0 like 0 dislike
1 answer
asked Jul 10, 2019 by 9StarRu
0 like 0 dislike
1 answer
asked Jul 18, 2019 by 9StarRu
0 like 0 dislike
1 answer
asked May 22, 2019 by kinglostov
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users