400 access error
-
Hi,
Few hiccups to begin with entering the api etc.
Checked ok, but when I test I get a 400 bad request from your page?
Trying it again I get a 404 on my own site.
I’m using a plugin that rewrites the default folders for security, I notice the URL for the png it’s trying to access is the default folder structure, is that why it is failing?
-
Sorry about the issue!
So the test URL is producing a 404 for your site?
It is, but first I get a “bad request” 400 error.
Does it work if you disable the security plugin?
Which security plugin are you using?
Our CDN plugin rewrites urls so for static content so they go through the CDN , but other plugins that do similar things may interfere. I can try my best to look into this for you though.
Thanks, I’m using
https://en-gb.ww.wp.xz.cn/plugins/wp-hide-security-enhancer/
As the security plugin, am also using cloudflare.
It does look like it is the plugin conflict, as when I disable it, the test.png works.
Just a note, I’m also using hummingbird cache/optimiser and I haven’t entered the shift8 cdn URL into that yet, wasn’t sure whether to before I enabled the CDN first.
Another note is that the url that the CDN points to is showing \wp-content\plugins etc (when it works) so the URL isn’t getting picked up from my custom folder setup (ie what is getting rewritten by WP Hide).
Thanks so much for any help, and thanks for answering so quickly !
Just a note, I’m also using hummingbird cache/optimiser and I haven’t entered the shift8 cdn URL into that yet, wasn’t sure whether to before I enabled the CDN first.
Our plugin is supposed to rewrite the URLs when it is enabled. You could try disabling (not deactivating , just disable in the plugin settings) the Shift8 CDN and put the CDN URL prefix into your hummingbird cache system. Perhaps that system works better with WP Hide?
Another note is that the url that the CDN points to is showing \wp-content\plugins etc (when it works) so the URL isn’t getting picked up from my custom folder setup (ie what is getting rewritten by WP Hide).
WP Hide is likely what is causing the conflict here. Our plugin may not work nicely with another plugin that is rewriting URLs to hide wordpress. Unfortunately the only option is to enter the CDN url (i.e. <your prefix>.wpcdn.shift8cdn.com>) into a caching pluging that is known to work with WP hide, or disable WP Hide.
Hi,
Thanks for the advice, unfortunately I don’t want to get rid of WP-hide, and I can’t for the life of me find out how to plugin the Shift8 URL into Hummingbird anywhere.
Appreciate your feedback.
Hello,
Unfortunately the plugin WP Hide is causing the requested assets to fail. You could try to write the following rules into your .htaccess file in the root of your site, but be warned that it could break your site, in which case you might have to revert :
RewriteEngine On RewriteCond %{HTTP_HOST} ^site\.com$ [NC] RewriteCond %{REQUEST_URI} \.(jpe?g|png|svg|gif|pdf|tiff|css|js|eot|ttf|woff2?)$ [NC] RewriteRule ^ https://<YOUR PREFIX>.wpcdn.shift8cdn.com%{REQUEST_URI} [R=301,L]Make sure also to replace <YOUR PREFIX> in the above snippet with your cdn prefix.
I will have to mark this issue as resolved because the WP Hide is causing it to break, not the CDN plugin here.
also in the above snippet , “^site\.com$” needs to be your site’s domain obviously
I didn’t see your reply, and thanks for the snippet.. BUT !
(and I feel foolish)
WP Hide has a CDN setting, I entered the Shift8 URL and all works !
Can’t believe I didn’t see it, and apologies for the confusion. At least now we know Shift8 works in harmony with WP Hide.
Thanks again for your help.
no worries – glad you got it working
Working and I love it !
The topic ‘400 access error’ is closed to new replies.