J
J
JastaFly2021-11-25 18:03:36
1C-Bitrix
JastaFly, 2021-11-25 18:03:36

Urlrewrite and pictures?

Good day to all! It is necessary that the pictures on the site be available by CNC. I usually use urlrewrite for this purpose, but when I try to create an image rule:

140 =>
        array (
            'CONDITION' => '#^/library/([a-z-|_]+)/([a-z-|_0-9]+).jpeg(\\?(.*))?#',
            'RULE' => 'CONTENT_TYPE=$1&SYMBOL_CODE=$2',
            'ID' => '',
            'PATH' => '/library/pdfviewer.php',
            'SORT' => 100,
        ),

nothing works. The script I need does not run and I get 404. If 404 is not from the site, but from the Bitrix environment:
619fa4fff3a72480614562.jpeg
It seems that this 404 appears before urlrewrite has time to work out. Tell me how to implement urlrewrite for pictures?!?? If it's possible,
thank you in advance :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Adamos, 2021-11-25
@JastaFly

Most likely, the web server is simply configured to give static directly and is not going to send a request for an image to PHP in principle.
In Bitrix, as far as I know, pictures are regularly uploaded and are not involved in any CNC.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question