A
A
Ajax2019-09-30 15:33:34
1C-Bitrix
Ajax, 2019-09-30 15:33:34

The page does not open without adding .php, what's the problem?

Hi everybody!
The page on Bitrix does not open until
you add .php
to the url

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-09-30
@karimsin

What does "page" mean? Due to the fact that you called two different things with this word in one sentence, you have confusion and problems.
site.com/catalog/page is the url that should be processed by the system if the server did not find such a file on disk, as a result of which the system should run some kind of script from disk.
site.com/catalog/page.php is the url that is processed by the server and a script with that name exists and is therefore run.
On what basis did you decide that the same script should be run if the URL is site.com/catalog/page ?
What are the prerequisites for this?
Probably you need to somehow explain either to the server that when you request a missing file, you need to try to find the same one but with ".php" at the end. Or let the server transfer control to the Bitrix routing system and then you must write the appropriate rule in urlrewrite.php, as Yuri Lyadov
suggested. Of course, do it like this:

array (
    'CONDITION' => '#^/catalog/page#', // Здесь пишите на какой url нужно реагировать, если файла нет...
    'RULE' => '',
    'ID' => '',
    'PATH' => '/catalog/page.php', // а здесь какой скрипт запускать
    'SORT' => 100,
  ),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question