vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Http to Https redirect (https://vborg.vbsupport.ru/showthread.php?t=315884)

tanzeelniazi 12-07-2014 01:17 PM

Http to Https redirect
 
3 Days ago i change http to https after i see when enter the name or check any url from google and the open it i see he use http only and the after i click the logo the i see https its mean links not redirecting http to https opening in first time via search from google and other search engines.
how to redirect

ozzy47 12-07-2014 01:24 PM

You can try something like this in your .htaccess.

Code:

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

Replacing yourwebsite\.com with your site name.

webmastersun 12-07-2014 01:53 PM

Https will not improve more your SEO rankings

BTW, Thanks ozzy47 for the codes

ozzy47 12-07-2014 02:40 PM

The OP said nothing about rankings. :confused:

Hopefully they code does work, been awhile since I work on a site that needed it. :)

tanzeelniazi 12-07-2014 03:09 PM

https grow the ranking
Thanks Ozzy let me try can you tell me 1 thing where i put this code in htaccess
in start or the end

ozzy47 12-07-2014 03:15 PM

Try in the beginning first.

tanzeelniazi 12-07-2014 04:06 PM

Oops code is not working :(

ozzy47 12-07-2014 04:09 PM

Hmmm, try this then.

Code:

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


tanzeelniazi 12-07-2014 04:28 PM

Google showing my new links with Https and old is not.
when i check my old link in google and then i open it still showing Http. after i click in the forum of any link he is showing https
why redirecting not working :(

ozzy47 12-07-2014 04:34 PM

Ok one more time.

Code:

# Ensure we are using HTTPS version of the site.
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Nothing to change in this one, use it as is.


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01190 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete