K
K
KRHD2018-03-14 19:16:55
htaccess
KRHD, 2018-03-14 19:16:55

How to rewrite cond to a specific subdirectory?

There is a code that translates all .html to /
RewriteRule ^(.*)\.html$ /$1 [L,R=301]
How to make it not work for products, namely:
http://domain.com/katalog/{категория}/{товар}.html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2018-03-14
@KRHD

Add rule:!^/katalog/(.[a-z0-9]+)/(.[a-z0-9]+)\.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question