Answer the question
In order to leave comments, you need to log in
How to make a part of the url in cnc with htaccess start after another but besides the same one?
there is such a situation with CNC about languages:
for example, you need to make links of this type with a choice of language and without
mysite.com/blog
and
mysite.com/lang/en/blog
if you make such a rule
RewriteRule ^lang/(.*)/$ index .php?dir=main〈=$1
RewriteRule blog$ index.php?dir=blog [L]
then it works but how to make it not output like this when clicking on languages - mysite.com/lang/en/lang/en
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} !/lang/en/.*$
RewriteRule ^lang/(.*)/$ index.php?dir=main〈=$1
RewriteCond %{REQUEST_URI} !/blog/.*$
RewriteRule blog$ index.php?dir=blog [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question