vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Forwarding http:// to http://www. (https://vborg.vbsupport.ru/showthread.php?t=212106)

TruthElixirX 04-24-2009 09:35 PM

Forwarding http:// to http://www.
 
Is there a way to do this on vBulletin without using mod_rewrite and a .htaccess file? My site is running into problems with cookies (If you visit without the www. then you aren't logged in, the web browser sees it as two cookies, or something.)?

Is there a fix for making one cookie work on http:// and http://www.?

Kiros72 04-25-2009 08:28 AM

I'm fairly certain that you're going to have to use a .htaccess rewrite if you want to forward to www.*

But have you tried changing the cookie options in your vBulletin AdminCP? For instance, modifying the cookie domain to be ".domain.com" without quotes and where domain.com is actually your domain (notice the dot in front of the domain name).

bbcentral 04-26-2009 06:38 AM

I had the exact same issue with my forum.

In your .htaccess file, put this:
Code:

###########################################################
# MOD_REWRITE
###########################################################
Options +FollowSymlinks
RewriteEngine On

#########################
# ADD WWW.
#########################
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]

Demo:
http://bluesbrotherscentral.com
http://bluesbrotherscentral.com/forum/
(both forward to 'www')

It's a 301 redirect (Moved Permanently), so it should also help you as far as Search Engine indexing/optimisation.

sheppardzwc 04-26-2009 01:14 PM

Quote:

Originally Posted by bbcentral (Post 1799158)
I had the exact same issue with my forum.

In your .htaccess file, put this:
Code:

###########################################################
# MOD_REWRITE
###########################################################
Options +FollowSymlinks
RewriteEngine On

#########################
# ADD WWW.
#########################
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]

Demo:
http://bluesbrotherscentral.com
http://bluesbrotherscentral.com/forum/
(both forward to 'www')

It's a 301 redirect (Moved Permanently), so it should also help you as far as Search Engine indexing/optimisation.

...and make sure that the rewrite module is on in your Apache.

bbcentral 04-26-2009 05:28 PM

Quote:

Originally Posted by sheppardzwc (Post 1799294)
...and make sure that the rewrite module is on in your Apache.

Well that's usually a given, but yes :)

NeoSov 04-26-2009 10:31 PM

Thank you!

nomoreturn 04-30-2009 05:09 AM

Thanks its works on my site


All times are GMT. The time now is 07:11 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.02105 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete