Title: SSL issue causing redirect
Last modified: August 31, 2016

---

# SSL issue causing redirect

 *  [Kathy_Goss](https://wordpress.org/support/users/kathy_goss/)
 * (@kathy_goss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/ssl-issue-causing-redirect/)
 * Hi, I’ve been testing your plugin for a new project we are hoping to launch in
   the next couple of weeks. Although the plugin appears to be working fine, what
   we have found is that there is a call for the a5-framework-frontend.css file 
   that is causing a redirect seemingly as it is being called via http – see /plugins/
   category-feature/class-lib/A5_DynamicFileClass.php around line 130 – our htaccess
   rules catch the request and force a rewrite (301 redirect) to the same location
   using https and it works fine… the initial miss though causes a big hiccup in
   page load time.
 * Is it possible for you to call https within your plugin?
 * [https://wordpress.org/plugins/category-feature/](https://wordpress.org/plugins/category-feature/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [tepelstreel](https://wordpress.org/support/users/tepelstreel/)
 * (@tepelstreel)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/ssl-issue-causing-redirect/#post-7138450)
 * Hi Kathy,
 * as the file is called with the function `get_bloginfo('url')`, it should automatically
   have the https adress of your blog. The problem with the redirect and long loading
   time is not your htaccess rule. It’s the rewrite rule of the plugin’s css file:`
   add_rewrite_rule('a5-framework-frontend.css', 'index.php?A5_file=wp_css', 'top');`
 * I make use of dynamical CSS, built in php and cached in the options of the plugin(
   in order to not build it over and over again). However, the redirection from 
   the virtual file name to the query seems to take time.
 * I found that you save the most loading time by just writing the CSS inline instead
   of using the virtual file.
 * I hope that helps.
 * Best,
    Stefan
 *  [max](https://wordpress.org/support/users/maxfein/)
 * (@maxfein)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/ssl-issue-causing-redirect/#post-7138486)
 * Hi Stefan, thanks for your response… looking at the issue w/ Kathy’s site a bit
   more closely shows that the issue actually is that the initial request looks 
   like:
 * `https://sub.example.com/a5-framework-frontend.css?ver=1.0%20beta%2020160127%
   20FCW`
 * which yields a 301 to
 * `https://sub.example.com/a5-framework-frontend.css/?ver=1.0%20beta%2020160127%
   20FCW`
 * which yields a nice 200 – the difference seems to be the trailing forward slash
   before query string…
 * You can see an archived waterfall showing the above on a live site [at pingdom tools =)](http://bit.ly/1OWAW2u)
 * We have altered the code at line 132 in A5_DynamicFileClass.php to include the
   trailing forward slash and now achieve a nice 200 response upon initial page 
   load…
 * `$file = (false === get_option('rewrite_rules')) ? '?A5_file=wp_css' : '/a5-framework-
   frontend.css/';`
 * thoughts?
 * Cheers, Max
 * [edit: we are moving to use HTTP/2 and inlining is not a best practice for performance
   optimization in such context.]
 *  Plugin Author [tepelstreel](https://wordpress.org/support/users/tepelstreel/)
 * (@tepelstreel)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/ssl-issue-causing-redirect/#post-7138488)
 * Yes, one thought: How stupid can I be? 😀
 * I was looking into the exact same thing the other week with pingdom. I just overlooked
   the bloody trailing slash.
 * And one thing to say: Cheers! Thanks a lot for sorting this out for me, Max.
 * It’s thanks to people like you that my plugins seem to be good. 🙂
 * Cheers, Stefan

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘SSL issue causing redirect’ is closed to new replies.

 * ![](https://ps.w.org/category-feature/assets/icon-128x128.png?rev=1034300)
 * [Featured Category Widget](https://wordpress.org/plugins/category-feature/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/category-feature/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/category-feature/)
 * [Active Topics](https://wordpress.org/support/plugin/category-feature/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-feature/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-feature/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [tepelstreel](https://wordpress.org/support/users/tepelstreel/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/ssl-issue-causing-redirect/#post-7138488)
 * Status: not resolved