A
A
Alfiya Safieva2020-07-09 11:40:00
htaccess
Alfiya Safieva, 2020-07-09 11:40:00

How to redirect to htaccess. for papka1/papka2 to papka2/papka1?

Please help, I really need it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-07-10
@shambler81

If clearly according to

RewriteRule ^papka1/papka2$ /papka2/papka1\? [L,R=301]

If you need to change any first to any second
RewriteRule ^(.+[^\/])/(.+[^\/])(\/|)$ /$2/$1\? [L,R=301]

If you need to change certain but with numbers for example papka332/papka111 shorter numbers can change.
RewriteRule ^(papka[0-9]{1,})/(papka[0-9]{1,})$ /$2/$1\? [L,R=301]

Now the question is why do you? at the end of the Ural, GET begins with it, but you don’t have it, why do you need it there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question