A
A
Artem Ivanov2020-01-26 14:01:42
JavaScript
Artem Ivanov, 2020-01-26 14:01:42

How to add js file to all pages of the site?

It is necessary to add script .js to all pages of the site, including those nested in subfolders.
Adding to the footer, for example, I do not cover other site folders and pages where the footer is not connected.
Is there an option to add the file via root .htaccess or other options to add a .js file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
McBernar, 2020-01-27
@McBernar

Run a script on the node that will open all project files and inject the necessary line before /body. A task for 5 minutes for the knowledgeable, for half an hour for the not very knowledgeable.
Well, or hands.

W
wisgest, 2020-01-27
@wisgest

If on-the-fly conversion with .htaccess is required, you should probably look into filters in Apache . I can't say anything more.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question