K
K
ktenante2020-01-17 01:32:10
css
ktenante, 2020-01-17 01:32:10

How to redirect to ^ua/ pages other than ^ua/$?

Hi all! Knowledgeable people, please help me set up the redirect correctly. I've tried different options myself, but for some reason it doesn't work.
you need a redirect from without html to html
while you need moysite.com.ua/ua/catalog to become moysite.com.ua/ua/catalog.html,
but moysite.com.ua/ua/ (that is, the main one in Ukrainian ) was without html and remained moysite.com.ua/ua/
There is also a Russian version on the site, which looks like this: moysite.com.ua/catalog.html and the main moysite.com.ua .
I use the following construction:
RewriteCond %{REQUEST_URI} !^ua$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)$ /$1.html [R=301,L]
resulting in moysite.com pages. ua/ua/.html
Please help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aricus, 2019-04-05
@Aricus

If I understand the question correctly, you can, for example, like this. Well, or do it by analogy with a black rectangle.

.box_red {
  background-color: #fe3a3a;
  max-width: 1050px;
  width: 100%;
  margin-left: -100px;
}

D
dodo512, 2020-01-17
@ktenante

RewriteEngine on

RewriteCond $1 !^ua$
RewriteRule ^([^.]+?)/?$ /$1.html [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question