A
A
abylalikkkk2022-04-01 14:08:52
htaccess
abylalikkkk, 2022-04-01 14:08:52

How to redirect all pages in htaccess?

How to redirect all pages /ru/blog/post(n) to /ru/article/post(n), i.e. change blog to article.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mafia8, 2022-04-03
@mafia8

.htaccess file:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^ru/blog/post([0-9]{1,10})$ ru/article/post$1 [R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question