M
M
mydarck2021-05-26 12:33:46
htaccess
mydarck, 2021-05-26 12:33:46

How to write one revritcond for multiple revriterule?

Hello!
I am writing a rule for a web server. I understand this poorly, I read the documentation, but have not yet reached the desired answer.
The task is as follows: to open another page at a certain address.
The page on which the content is located has the following form amp/produkcziya/pryamaya-uf-pechat/uf-pechat-na-polistirole/index.html.
Page to redirect to amp/produkcziya/pryamaya-uf-pechat/na-polistirole/.
My attempts look like this:

Ст. 1 - RewriteCond %{REQUEST_URI} ^/amp/.*
Ст. 2 - RewriteRule ^amp/uslugi/frezerovka/kompozita/$ amp/uslugi/frezerovka/frezerovka-kompozita/index.html [L]

As I understand it: Art. 1, we define a pattern and say that after the domain, the string must begin with amp, and any number of arbitrary characters can follow.
Further in Art. 2 we substitute catch the request and replace it with content from another page.
If I add Art. 3, which must also match the specified pattern, then nothing works. And I went this way. I copy St. 1 then add the following reregistration. And so 20 times. That's how it works. I understand that the solution is not elegant, but so far, there is not enough knowledge for the best option.
Please tell me if you know how.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question