www.webdeveloper.com
Results 1 to 2 of 2

Thread: .htaccess rewrite folders and subfolders

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    21

    .htaccess rewrite folders and subfolders

    Code:
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} .wp-content/uploads/ 
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    I am trying to call all images from any subfolder of mysite.com/wp-content/uploads/ as https if the URL is https or as http if the URL is http.

    http://mysite.com/some-page-with-images/ will have images <img src="http://....

    https://mysite.com/some-page-with-images/ will have images <img src="https://....


    The problem is that when you go from a https page to a page with images,coded as http, an error occurs saying that some content is not secure.

  2. #2
    Join Date
    Apr 2010
    Posts
    88
    Use https urls to link images eg https://mysite.com/wp-content/uploads/img1.jpg .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles