A
A
Alexander Mishchenko2019-05-25 17:14:50
Apache HTTP Server
Alexander Mishchenko, 2019-05-25 17:14:50

How to redirect only categories without subpages?

There is a category https://site.com/product/ it has its own products. There is another category https://site.com/material/ for their products. How do I redirect ONLY https://site.com/product/ to https://site.com/materialy/ as long as https://site.com/product/product1 works?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-05-25
@xxxsanchosxxx

RedirectMatch 301 ^/product/$ https://site.com/materialy/

Or
RewriteEngine on

RewriteRule ^product/$ https://site.com/materialy/ [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question