Answer the question
In order to leave comments, you need to log in
How to organize a redirect of a group of links?
Hello, the task is to redirect a group of links of the form:
site.ru/blog/article_slug
to:
site.ru/news/article_slug tried
like this:
RewriteCond %{REQUEST_URI} ^(.*)(\/blog\/)(\S+)$
RewriteRule /news\/%3 [R=301,L]
AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
ServerSignature Off
<IfModule mod_rewrite.c>
RewriteEngine on
RedirectMatch 403 /\..*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question