W
W
WebforSelf2018-09-16 15:29:46
htaccess
WebforSelf, 2018-09-16 15:29:46

How to close a specific folder from access by unauthorized WP users?

Friends, there is a set of folders in each of them index.html , it turns out such a directory from a set of folders in each of which has its own html
. It is required that users be created for this database, and access to it was given by login password.
I decided to use WordPress for this.
I installed the Force Login plugin so that the engine always required authorization.
and started implementing our html directory. Because this directory is being updated, and the person who asked to do this wants to manually upload folders with html articles there. It is necessary to implement everything in this form.
I inserted the main index.html of the directory into the template - index.php and placed the folders at the root
in the folder
articles/test1
articles/test2
And so everything worked (hooks from vp were not needed and other plugins, so everything seemed to work), but then I noticed that access was closed only to the main page. and the data above
articles/test1 and articles/test2 can be accessed at the direct address without authorization.
So there is a dilemma, to shove these html pages, but so that they are under the authorization of the WP. Who will advise what?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Pupkin, 2018-09-16
@HectorPrima

Isn't it easier to write a parser that will upload all articles to wordpress!?
You just sculpt such crutches ...

I
Igor Vorotnev, 2018-09-16
@HeadOnFire

Throw out WordPress from this compote, it is superfluous there.
Or transfer content from HTML pages to WP, but correctly. 2018 is just outside the window.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question