I've got a Silverstripe ran site, which I recently added a SSL certificate to.
Because of this I need to change the HTML Base Element to https from http as now none of the images, stylesheets etc linking correctly and are being rejected as they're not being loaded over https.
I cannot find where this is being set.
I've searched the application code and the database and neither are giving me any luck.
It must be pulling http from somewhere - the question is where?
I understand that silverstripe pulls it's base_tag from the HTML base element.
Does anyone know where this is set for a silverstripe site?
Thanks in advance,
Josh
Just add Director::forceSSL(); to your _config.php
Related
I am currently working on a site which is built in using a Custom Designed CMS (there are files with .asp extension). This site is really old and seems like running on IIS Server, which I don't have the access. User asked me to add few items. I made changes to index.html file and uploaded to the server, however, the changes don't seem to take in affect.
So my question to Pros, is, do i have to restart the IIS instance? I tried to change the index.html existing content such as Search Bar's placeholder text from Search to search, uploaded the page and nothing happened. Also added new p tags and no luck.
I have never dealt with IIS site. Any suggestions? One thing for sure I can see is that the Home Page in Custom backend is pointing to the index.html file (which I am altering).
Not at all. I does require a reload/refresh at the client-side though.
-Tango
I am not that good at explaining so for example (and this is my actual site), http://securityfenceonline.com/ has a different font on the header menus then http://www.securityfenceonline.com/ does. Basically my question here is how do i get the fonts from the site that starts with www to work on the site that doesn't have a www. My second question is why are there two different urls to access the same website. Thank you so much!!
Coded with: HTML
Uses some Joomla
Newbie at coding
Your DNS entries are configured to point both securityfenceonline.com and www.securityfenceonline.com to the same server. This isn't uncommon. What should be happening though is your server should be configured to 301-redirect one to the other. Otherwise you're creating duplicate content which isn't good for SEO purposes.
The font issue is that you're trying to load a font cross-domain (from www.). You can't do this without the appropriate CORS headers. If you look in your developer console, you should see something like:
Font from origin 'http://www.securityfenceonline.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://securityfenceonline.com' is therefore not allowed access.
If you were to redirect to only one hostname, you wouldn't have this issue. You really should be referencing files in your CSS by relative paths though, as this would also solve the issue.
I have a site built around Joomla, It was working fine from the time it was built. But from few days back the css changes in any of the css files are not reflecting in the site. I am able to see all the other UI changes except CSS. I have cleared he cache and checked from different ISP but no result. Can anyone suggest me how to resolve this.
Thanks in advance.
I think you are using a Template which uses LESS instead of CSS. If so, see if there are any folder inside "/public_html/templates/your_template/less/" exists or not.
If it exists then you have to create (if it is already not there) a css file named "custom.css"
inside "/public_html/templates/your_template/css/" folder and write your CSS code inside this file.
Joomla will pickup this "custom.css" file at last and your changes will be reflected.
Sorry for late reply but I found the answer. It is due to enabling CloudFlare in my hosting account. When I reached to my Hosting support they disabled the CloudFlare and everything started working fine and I am able to see all the CSS changes.
For some reason that I don't know the base tag at http://www.galaxy-os.kd.io?/dev (which is a PHP echo of http://galaxy-os.koding.com) doesn't work. I don't know why this is and it's really annoying. (FYI Koding.com have announced a new version with .kd.io domains which is why I'm doing this)
The links to the stylesheet and js file seem to be correct and they both work fine if I open them up manually (which means that the base tag does in fact work), but the links give a 403 error when loaded by the site itself. Maybe there is some cross domain restriction in effect?
Just wanted a confirmation for this: Firefox currently doesn't play well for picking custom fonts through a sub-domain via the font-face tag. Other browsers do this without any problems.
A little research showed up saying that i am required to set the Access-Control-Allow-Origin as is shown in the link here: http://pastie.org/653265
Essentially i have my blog at kaushikgopal.com/blog and i was trying to
access fonts that within this blog that are available at
font.kaushikgopal.com. I tried changing the same in my .htaccess file but couldn't resolve the issue.(I placed a .htaccess file within the font sub-domain folder and directly pasted code from the above pastie link).
I submitted a ticket to dreamhost asking for assistance and they were helpful in clearly stating "We do not support Access-Control-Allow-Origin on shared hosting servers".
So i didn't go the sub-domain route for fonts. But i'm a little curious, has anyone tried this (with a dreamhost hosting account would be helpful)? Just want to confirm what the tech-support guy suggested is accurate and there's no other way.
Thanks.
Another nice link clearly stating the problem :
http://www.stevesouders.com/tests/font-face/xdomain.php
I just tried and it does work (on Dreamhost). Eg, /mysite/pub/.htaccess:
header add Access-Control-Allow-Origin *
See http://42at.com/lab/Thumboard/bookmarklet.html. The bookmarklet does an ajax call to my domain, and with above access-control is able to grab html snippet.