S
S
Soho2019-06-10 18:46:51
htaccess
Soho, 2019-06-10 18:46:51

How to properly redirect .htaccess?

Greetings, dear experts, help me correctly make a redirect from a page duplicate,
now a page like https://mysite.ru/base/ is a duplicate of the main page, i.e. https://mysite.ru, how to correctly write a rule in htaccess when opening https: //mysite.ru/base/ redirected to https://mysite.ru
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-06-10
@focuspro

RedirectMatch 301 ^/base/$ https://mysite.ru/
Or

RewriteEngine On
RewriteRule ^base/$ https://mysite.ru/ [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question