Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-01-2016, 07:43 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this my Man ....


Code:
# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^yoursite.com$
RewriteRule ^(.*)$ "https\:\/\/www\.yoursite\.com\/$1" [R=301,L]


# To redirect both www and non www
RewriteCond %{HTTP_HOST} ^yoursite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.yoursite\.com$
RewriteRule ^/?$ "https\:\/\/www\.yoursite\.com" [R=301,L]
Reply With Quote
3 благодарности(ей) от:
kylek, MarkFL, RichieBoy67
  #12  
Old 12-01-2016, 08:12 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also encountered problems in the AdminCP with HTTPS and Cloudflare. This is what I had to change:

/admincp/index.php look around line 495, and replace the $mainframe variable with
PHP Code:
$mainframe "<frame src=\"" str_replace("http://""https://"iif(!empty($vbulletin->GPC['loc']) AND !preg_match('#^[a-z]+:#i'$vbulletin->GPC['loc']), create_full_url($vbulletin->GPC['loc']), "index.php?" $vbulletin->session->vars['sessionurl'] . "do=home")) . "\" name=\"main\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"10\" border=\"no\" />\n"
Reply With Quote
Благодарность от:
RichieBoy67
  #13  
Old 12-01-2016, 08:13 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks brother,

I tried that one earlier and I could not get on. I have to look at the rest of my htaccess.

I have decided to revert my main url's back to http for now.. Too many issues and some of them may be from Cloudflare. Thought I had this almost done but Chrome was giving me major issues.

As of right now my ads are using https as are other components though the main urls are still http.

PITA..

Thanks for the assistance bro

--------------- Added [DATE]1480630464[/DATE] at [TIME]1480630464[/TIME] ---------------

Quote:
Originally Posted by Dave View Post
I also encountered problems in the AdminCP with HTTPS and Cloudflare. This is what I had to change:

/admincp/index.php look around line 495, and replace the $mainframe variable with
PHP Code:
$mainframe "<frame src=\"" str_replace("http://""https://"iif(!empty($vbulletin->GPC['loc']) AND !preg_match('#^[a-z]+:#i'$vbulletin->GPC['loc']), create_full_url($vbulletin->GPC['loc']), "index.php?" $vbulletin->session->vars['sessionurl'] . "do=home")) . "\" name=\"main\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"10\" border=\"no\" />\n"
I just posted before I saw this. Let me take a look and maybe this is what I need.

Thanks

--------------- Added [DATE]1480630717[/DATE] at [TIME]1480630717[/TIME] ---------------

Quote:
Originally Posted by Dave View Post
I also encountered problems in the AdminCP with HTTPS and Cloudflare. This is what I had to change:

/admincp/index.php look around line 495, and replace the $mainframe variable with
PHP Code:
$mainframe "<frame src=\"" str_replace("http://""https://"iif(!empty($vbulletin->GPC['loc']) AND !preg_match('#^[a-z]+:#i'$vbulletin->GPC['loc']), create_full_url($vbulletin->GPC['loc']), "index.php?" $vbulletin->session->vars['sessionurl'] . "do=home")) . "\" name=\"main\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"10\" border=\"no\" />\n"
How did you have the Crypto page set on Cloudflare Dave?
Reply With Quote
  #14  
Old 12-01-2016, 08:44 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
Thanks brother,

I tried that one earlier and I could not get on. I have to look at the rest of my htaccess.

I have decided to revert my main url's back to http for now.. Too many issues and some of them may be from Cloudflare. Thought I had this almost done but Chrome was giving me major issues.

As of right now my ads are using https as are other components though the main urls are still http.

PITA..

Thanks for the assistance bro

--------------- Added [DATE]1480630464[/DATE] at [TIME]1480630464[/TIME] ---------------


I just posted before I saw this. Let me take a look and maybe this is what I need.

Thanks

--------------- Added [DATE]1480630717[/DATE] at [TIME]1480630717[/TIME] ---------------



How did you have the Crypto page set on Cloudflare Dave?
Default settings as far as I know: flexible SSL, HSTS on, origin pulls off, opportunistic encryption on, TLS 1.3 on, automatic HTTPS rewrites on.
Reply With Quote
  #15  
Old 12-01-2016, 09:25 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I will give this another go in a few minutes.

Any idea as to what was messing up my htaccess redirects? I tried Cheech's above and I had this one as well:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

neither of these worked and gave me redirect errors..

Thanks again guys,
Rich
Reply With Quote
  #16  
Old 12-01-2016, 09:40 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah yeah ! I had cloudflare too and it didn't work with the https ... they do say it has problems with it for some reason ... sorry my Man ...
Reply With Quote
  #17  
Old 12-01-2016, 09:42 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CAG CheechDogg View Post
Ah yeah ! I had cloudflare too and it didn't work with the https ... they do say it has problems with it for some reason ... sorry my Man ...
That's ok brother, Thanks! :up:

--------------- Added [DATE]1480635993[/DATE] at [TIME]1480635993[/TIME] ---------------

Quote:
Originally Posted by CAG CheechDogg View Post
Ah yeah ! I had cloudflare too and it didn't work with the https ... they do say it has problems with it for some reason ... sorry my Man ...
I like Cloudflare but the plan I have is currently $20 The next one up is $200. I think that is the plan I need to use my own cert that I already have..I think my issue is that I need to use their cert.
Reply With Quote
  #18  
Old 12-01-2016, 09:47 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah I think so too ... that is what I remember from talking with hostgator about it all ...
Reply With Quote
  #19  
Old 12-01-2016, 09:50 PM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've used without issue in the past :

Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://YOURSITE$1 [R,L]

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Then I just created a a page rule On cloudflare and disabled performance on the admincp and had no issues.
Reply With Quote
2 благодарности(ей) от:
RichieBoy67, shimei
  #20  
Old 12-01-2016, 09:51 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like they will get me for another $5 per month just to use a decent cert from them.. I think that will do the trick though.

Will still need to figure out my htaccess but that should do it hopefully..

--------------- Added [DATE]1480636366[/DATE] at [TIME]1480636366[/TIME] ---------------

Quote:
Originally Posted by KevinL View Post
I've used without issue in the past :

Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://YOURSITE$1 [R,L]

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Then I just created a a page rule On cloudflare and disabled performance on the admincp and had no issues.
Thanks, I will try that htaccess

I already have everything bypassed for admincp.

--------------- Added [DATE]1480636898[/DATE] at [TIME]1480636898[/TIME] ---------------

I cannot understand why everything is messed up in Chrome.. looks like my entire theme is screwed up.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04837 seconds
  • Memory Usage 2,312KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (3)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (6)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete