Home Forums WordPress Plugins Hide My WP Avoid direct access to php files – Exclude folder?

This topic is: not resolved
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #2741
    aqt
    Pro
    Post count: 41

    Hi I have a plugin which uses a lot of direct hits to php files and I would like to exclude some folders of the plugin, however I haven’t managed to do so.

    What I put in the exclude list is
    wp-content/plugins/newsletter/do/, wp-content/plugins/newsletter/emails/

    but this doesn’t exclude wp-content/plugins/newsletter/do/view.php for example So what is the way to exclude a folder?

    Thanks

    EDIT:I forgot to say that I use Version 3.00 of the plugin since this works fine for me so far. Is this the problem?

    • This topic was modified 9 years, 7 months ago by aqt.
    #2764
    Suman M.
    Post count: 12478

    Hi, the “Exclude Files” option box is not for excluding access to listed files. Actually it’s just the reverse – “avoid direct access to PHP files…except listed in Exclude Files”

    You can add the line below in “Replace URLs” (this will redirect all requests for /do/view.php to 404 not found page)
    wp-content/plugins/newsletter/do/view.php==nothing_404_404

    #2774
    aqt
    Pro
    Post count: 41

    Exactly I want to allow access to that folder while having the option checked. So I want to exclude it from the list and doing so above doesn’t exclude it.

    #2787
    Suman M.
    Post count: 12478

    Adding “wp-content/plugins/newsletter/do/view.php” to Exclude List will actually allow access to “wp-content/plugins/newsletter/do/view.php”. HMWP doesn’t have any option to exclude particular script/file.

    #2798
    aqt
    Pro
    Post count: 41

    it says that you can exclude a folder if you wish.

    So I want to exclude (meaning allow access on) those two folders
    wp-content/plugins/newsletter/do/
    wp-content/plugins/newsletter/emails/

    Putting wp-content/plugins/newsletter/do/, wp-content/plugins/newsletter/emails/ in the exclude list doesn’t work.

    #2801
    Suman M.
    Post count: 12478

    You do not need to specifically add those two folders to allow access to them. They should be accessible by default if you uncheck “avoid direct access to php files” option.

    #2807
    aqt
    Pro
    Post count: 41

    Yes I know that but I don’t want to allow access on any other place inside the website, so is there any way to exclude (meaning allow access on) a folder or folders in that list?

    • This reply was modified 9 years, 6 months ago by aqt.
    #2810
    Suman M.
    Post count: 12478

    HMWP plugin’s aim is to basically hide the fact that your site uses wordpress. The functionality that you are looking for isn’t currently possible with this plugin.

    #2817
    aqt
    Pro
    Post count: 41

    It is mentioned here. See attached image So you should remove this from there or do you plan to add this functionality later?? Anyway now it is confusing as it is

    Attachments:
    You must be logged in to view attached files.
    #2822
    Suman M.
    Post count: 12478

    Please find the attachment for the explanation.

    Attachments:
    You must be logged in to view attached files.
    #2825
    aqt
    Pro
    Post count: 41

    So can you tell me what do you mean by “or folders” in the attached picture i provided. It’s misleading

    #2828
    Suman M.
    Post count: 12478

    “folders” means all PHP files within that folder.

    #2829
    aqt
    Pro
    Post count: 41

    ok and how can I do this? What to I have to write if let’s say the folder is wp-content/plugins/plugin1/folder1/

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.