K
K
kiphirrr2019-01-24 17:14:25
htaccess
kiphirrr, 2019-01-24 17:14:25

How to correctly write a CNC implementation rule in htaccess?

you need to teach the server to understand the address
/catalog/dveri_mezhkomnatnye/mebel_massiv/granada/granada/type-bez_stekla/
as
/catalog/dveri_mezhkomnatnye/mebel_massiv/granada/granada/?type=bez_stekla
in htaccess I write:

RewriteEngine on
...
RewriteRule ^catalog/(.*)/type-(.*)/$ /catalog/$1/?type=$2 [L,QSA]
- gives 404
if you add the R key, then normally I
tried the redirect like this:
RewriteCond %{REQUEST_URI} ^/(.*)(?=type-)type-(.*)/ [NC]
RewriteRule ^.*$ /%1?type=%2 [NE,L]

The result is the same

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2019-01-24
@shambler81

Your answer is
How to redirect with GET parameter --> google
get parameter is not part of REQUEST_URI

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question