Jump to content
biotech

Installed SSL cert, path to assets are now 404

Recommended Posts

Hello community,

This is the first time I have enabled SSL with PW powered site so forgive the question.

Templates are set to HTTP or HTTP so content is being processed. However all the assets do not load correctly eg.

Failed to load resource: the server responded with a status of 404 (Page Not Found)

https://site.com/site/assets/files/1/logo.png 

 

Any tips?

Thank you!

Share this post


Link to post
Share on other sites

Hello,

My comment might not be of much help, but why do you try to mix http and https (provided that is the case...)? I consider it to be an outdated practice. The web is quickly moving towards being https only anyway.

  • Like 3

Share this post


Link to post
Share on other sites

Hi szabesz,

I don't need the entire site to be https just a segment/page. I would like to have HTTP as fallback in case SSL certs laps and expire. So at this point I could turn the entire site towards https (I see that .htaccess can be used) but I can't find how to adjust https vs. http for asset path processing. 

 

Thank you.

Share this post


Link to post
Share on other sites

If I'm not mistaken, browsers will complain if pages are being served as HTTPS with insecure resources. Further, I understand that Google is beginning a process that marks non HTTPS sites (or pages) as insecure. As such, my recommendation is simply to turn it on for everything and ensure it never expires.

Reference: Google Chrome to start marking HTTP connections as insecure

  • Like 3

Share this post


Link to post
Share on other sites

Thanks, .htaccess trick works but I am back to my post title...assets/files do not load. Is there a config setting that also needs adjusting?

 

assets.jpg

Share this post


Link to post
Share on other sites

The .htaccess file come with ProcessWire should work out of the box.

The only reason I can think of is that the web server doesn't allow you to override it's default setting values.

Do you have access right to the web server config??

 

 

 

Share this post


Link to post
Share on other sites
On 12/12/2016 at 4:13 PM, Gideon So said:

The .htaccess file come with ProcessWire should work out of the box.

The only reason I can think of is that the web server doesn't allow you to override it's default setting values.

Do you have access right to the web server config??

 

 

 

Thanks for the tip!

Turns out my host had to add https URLs to the list of allowed URLs for Hotlink protection option. All is good now! 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Peter Knight
      Hi all
      My .htaccess file is correctly redirecting all requests to
      https:// www. That's great until I want to work locally.
      I thought I had seen a blog post by Ryan where there was a new config setting to ignore both of these if working from localhost?
      I can't find it now so wondering if I was imagining 😕
       
       
    • By Marco Angeli
      Hi there,
      I added a ssl certificate to my site and I'd like to redirect every single http url to its new https version
      So I added this code in the .htacces file, after the RewriteEngine On :
      Redirect 301 /about https://www.mysite.it/about
      Unfortunately this is now working: I get the "too many redirects" error.
      The following code works, but it's a bulk redirection to the home page, something I don't want for SEO reasons (https://moz.com/blog/save-your-website-with-redirects😞
      RewriteCond %{HTTP_HOST} mysite\.it [NC]
      RewriteCond %{SERVER_PORT} 80
      RewriteRule ^(.*)$ https://www.mysite.it/$1 [R,L]
      Any suggestions?
    • By cosmicsafari
      Hi all,
      Just a quick question, when using the multisite module is there anything different that needs to be done in order to setup HTTPS for each of the domains its serving?
      Would a single SSL certificate for the main domain be enough to cover the others aswell or would you need multiple ceritficates one for each domain the mutlisite setup uses?
       
    • By dweeda
      I installed an SSL Certificate, then edited my .htaccess file:
        # -----------------------------------------------------------------------------------------------
        # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below.
        # -----------------------------------------------------------------------------------------------
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      by uncommenting out the Rewrite lines.
      Now I get 404 error pages when I try go to any .../processwire-master/<pagename>/
      This includes my admin page at .../processwire-master/processwire/, so i can't get into my admin.
      What else do I need to do?
×
×
  • Create New...