I
I
Ivan2019-01-30 19:03:42
htaccess
Ivan, 2019-01-30 19:03:42

How to create a .htaccess rule correctly?

I have a rule in the .htaccess file It sends all non
RewriteRule ^(.*)?$ material/ru.php [QSA,NC,L]
-existent pages of the type site.ru/123456 to the address material / ru.php processed a rule other than and opened the following address material/ en .php Thank you!

RewriteRule ^(.*)?$ material/ru.php [QSA,NC,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-01-31
@9StarRu

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]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question