Tagged: 404 error
November 30, 2017 at 6:18 pm #19013vitalizedPost count: 3
Hello, I’ve set up my site with the WordPress directories moved to a subfolder:
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 3 months, 2 weeks ago by vitalized. Reason: Didn't add admin login
Attachments:You must be logged in to view attached files.December 1, 2017 at 4:41 am #19026Suman MaharjanPost count: 7939
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.
December 1, 2017 at 1:01 pm #19037vitalizedPost count: 3
- This reply was modified 3 months, 2 weeks ago by Suman Maharjan.
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: 188.8.131.52, 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.December 1, 2017 at 6:46 pm #19041Suman MaharjanPost count: 7939This reply has been marked as private.
You must be logged in to reply to this topic.