Home Forums WordPress Plugins Hide My WP Pages load but ALL assets show 404 error

This topic is: not resolved

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Suman Maharjan 1 week, 6 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19013
    vitalized
    Post count: 3

    Hello, I’ve set up my site with the WordPress directories moved to a subfolder:
    index.php
    /mats-core/

    The server uses Nginx.
    The site was working.

    I’ve installed your plugin and copy/pasted the Nginx config generated into the sites vhost config:

    # BEGIN Hide My WP
    
    rewrite ^/other/js/embed\.min\.js /wp-includes/js/wp-embed.min.js?CBki_hide_my_wp=1234 last;
    rewrite ^/other/(.*) /mats-core/wp-includes/$1?CBki_hide_my_wp=1234 last;
    rewrite ^/file/(.*) /mats-core/wp-content/uploads/$1?CBki_hide_my_wp=1234 last;
    rewrite ^/ext/(.*) /mats-core/wp-content/plugins/$1?CBki_hide_my_wp=1234 last;
    rewrite ^/skin/main\.css /?style_wrapper=1&CBki_hide_my_wp=1234 last;
    rewrite ^/skin/style\.css /nothing_404_404?CBki_hide_my_wp=1234 last;
    rewrite ^/skin/(.*) /mats-core/wp-content/themes/makeartthatsells/makeartthatsells/$1?CBki_hide_my_wp=1234 last;
    rewrite ^/ajax /mats-core/wp-admin/admin-ajax.php?CBki_hide_my_wp=1234 last;
    rewrite ^/inc/(.*) /mats-core/wp-content/$1?CBki_hide_my_wp=1234 last;
    rewrite ^/(mats-core/readme\.html|mats-core/license\.txt|mats-core/wp-content/debug\.log|mats-core/wp-includes/$) /nothing_404_404?CBki_hide_my_wp=1234 last;
    rewrite ^/(((mats-core/wp-content|mats-core/wp-includes)/([A-Za-z0-9\-\_\/]*))|(wp-admin/(!network\/?)([A-Za-z0-9\-\_\/]+)))(\.txt|/)$ /nothing_404_404?CBki_hide_my_wp=1234 last;
    
    # END Hide My WP

    When I load the frontend pages all the assets have a 404 error (See screenshot).

    Do you know what the issue could be?

    • This topic was modified 2 weeks ago by  vitalized. Reason: Didn't add admin login
    Attachments:
    You must be logged in to view attached files.
    #19026
    Suman Maharjan
    Post count: 7363

    Hi, make sure that you add HMWP rules in the correct nginx config file and in correct place (the rules needs to be added within “server” block of nginx config file). And you need to restart Nginx server.

    Also, please post the Nginx config file here (as text file) after you have added HMWP rules in it.

    #19037
    vitalized
    Post count: 3

    Ah, okay!. The instructions say to add the generated config “right before try_files $uri $uri/ /index.php?q=$uri&$args;” which is obviously in the “location /” block. I’ve moved the config to the server block and the simple config worked.

    I’ve just updated the config to the most secure schema and set up the custom login, but now I get an error 500.

    Here’s the log:
    2017/12/01 12:48:33 [error] 24538#24538: *2 rewrite or internal redirection cycle while internally redirecting to “/index.php”, client: 185.92.25.21, server: new.makeartthatsells.com, request: “GET /mats-core/secure-login?reauth=1 HTTP/2.0”, host: “new.makeartthatsells.com”

    I’ve attached the Nginx config.

    Attachments:
    You must be logged in to view attached files.
    #19041
    Suman Maharjan
    Post count: 7363
    This reply has been marked as private.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.