Home › Forums › WordPress Plugins › Hide My WP › Advice on Replace URLs + CDN
- This topic has 16 replies, 2 voices, and was last updated 9 years, 2 months ago by Barbell.
-
AuthorPosts
-
October 21, 2015 at 12:08 pm #5324BarbellPost count: 57
Hi,
So changing ID classes works fine with Replace in HTMl.
But I’d like to change the url slightly as well.
So instead of:
<link rel=’stylesheet’ id=’maskedname-css’ href=’http://cdn.mysite.com/ext/658a2322/css/some-plugin.css’ type=’text/css’ media=’all’ />
This:
<link rel=’stylesheet’ id=’maskedname-css’ href=’http://cdn.mysite.com/ext/658a2322/css/maskedname.css‘ type=’text/css’ media=’all’ />
Or:
<link rel=’stylesheet’ id=’maskedname-css’ href=’http://cdn.mysite.com/maskedname.css‘ type=’text/css’ media=’all’ />
As long as the name is masked.
The problem is that I can’t get it to work while using my CDN.
Any idea if it can work with a CDN?
What I used was:
wp-content/plugins/my-plugin/css/myplugin.css == maskedname.css
I’ve also used other combinations with the cdn path included or with the modified permalinks & URLs included in the URL but couldn’t get it to work.
This works without the cdn activated but breaks with cdn activated.
I’ll attach my HMWP settings in a private reply.
October 21, 2015 at 12:10 pm #5325BarbellPost count: 57This reply has been marked as private.October 22, 2015 at 3:28 am #5340Suman M.Post count: 12478Hi, you can change the IDs in tags but it’s not recommended to change ID/class names in other tags like <div class=”xyz”>; <div id=”xyz”>; <span class=”xyz”>; etc. as doing so might break site’s styling.
The following replacement you have done is correct:
wp-content/plugins/my-plugin/css/myplugin.css ==> maskedname.cssBut as you are using CDN, you’ll need to input your CDN URL in “CDN path” option under HMWP general settings tab – http://codecanyon.net/item/hide-my-wp-no-one-can-know-you-use-wordpress/4177158/faqs/17469
- This reply was modified 9 years, 2 months ago by Suman M..
October 23, 2015 at 10:32 am #5389BarbellPost count: 57So I’ve just been testing.
Without using a CDN it works. The URL to the stylesheet has changed and the layout is still intact. The replaced url now looks like http://www.mysite.com/maskedname.css
But when I enter the CDN url in HMWP the replaced URL is not affected, it’s still http://www.mysite.com/maskedname.css
While all other URLs to css, js etc. are linked to cdn.
October 24, 2015 at 6:45 am #5398Suman M.Post count: 12478Can you please let us know your website’s wp-admin login details (as private reply) so that we can have a look at the issue further?
October 24, 2015 at 11:51 am #5408BarbellPost count: 57This reply has been marked as private.October 24, 2015 at 6:43 pm #5413Suman M.Post count: 12478This reply has been marked as private.October 24, 2015 at 7:16 pm #5414BarbellPost count: 57I know, I use W3TC. I tried the cdn option of HMWP to see if I could get replace url above working that way. But it doesn’t work either way. Only works without using a cdn.
October 27, 2015 at 10:44 am #5443BarbellPost count: 57Have you had a chance to take a look yet?
October 28, 2015 at 4:38 am #5454Suman M.Post count: 12478This reply has been marked as private.October 28, 2015 at 8:11 am #5468BarbellPost count: 57This reply has been marked as private.October 28, 2015 at 10:44 am #5479Suman M.Post count: 12478For, s-p.css path you’ll need to add following in replace in html:
http://www.mountmuscle.com/s-p.css => cdn.mountmuscle.com/s-p.cssIn HMWP to make use of multiple host names, remove cdn url from “cdn path” field in HMWP and add following replacements in “replace in html”:
http://www.mountmuscle.com/dsgn => cdn.mountmuscle.com/dsgn/
http://www.mountmuscle.com/file/ => cdn2.mountmuscle.com/file/
http://www.mountmuscle.com/other/ => cdn3.mountmuscle.com/other/
http://www.mountmuscle.com/ext/ => cdn4.mountmuscle.com/ext/October 28, 2015 at 4:16 pm #5506BarbellPost count: 57Alright thanks I’ll check it out, I saw you’ve made these changes.
I’ve also activated W3TC and disabled CDN in W3TC. Since HMWP takes care if that with the above changes.
Any idea if all these changes and replaced URLs I will be adding have a negative inpact on site speed (theoretically)?
October 28, 2015 at 4:37 pm #5508Suman M.Post count: 12478It does not impact on site speed.
November 2, 2015 at 9:49 am #5547BarbellPost count: 57Thanks.
I created another entry in Replace in HTML and Replace in URL like you’ve done.
But for some reason my entry is not working when W3TC is activated, I’ve emptied all caches multiple times, also purged CDN and Cloudflare. It works fine with W3TC deactivated.
Do you happen to have a clue why my entry is not working with W3TC activated?
-
AuthorPosts
You must be logged in to reply to this topic.