vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Forum Display Enhancements - Different Domain, Different Style (https://vborg.vbsupport.ru/showthread.php?t=174381)

ls7 12-17-2008 01:49 AM

Quote:

Originally Posted by dartho (Post 1687085)
Check your .htaccess file to make sure you don;t have any redirects in there - I noticed that ontractdriver.com redirects to www.ontrackdriver.com

Here is my .htaccess file. Would you mind having a look and letting me know if there are redirects in there? (sorry, I am not sure how to decipher)

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

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

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

dartho 12-17-2008 03:38 AM

I'm no expert in this area, but I'm guessing that:
Code:

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

is the issue. If it is what it looks like, it is redirecting all URL's which are NOT www.ontrackdriver.com to www.ontrackdriver.com

This would indeed redirect m.ontrackdriver.com to www.ontrackdriver.com

VBSEO would do this as it is good SEO to only have content listed on a single domain name, in this case it's www.ontrackdriver.com. I'd suggest changing this to:

Code:

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

This will then redirect URL's which don't have the www, but leave all others alone. The only other there will be is m.ontrackdriver.com and we don;t want this redirected anyway.

As I said, I'm no expert in this, so rather than delete the lines, copy then and then comment out the originals with a leading '#' character to make reversal easy if need be. You could even do a quick initial test by just commenting out that section altogther before editing.

hope this helps

ls7 12-17-2008 03:50 PM

Thanks, dartho. Commenting out the code worked. But changing it to the code you suggested doesn't work (returns 500 level server error).

At least it appears to be working right now, will continue to test. Is having the code commented out a viable long term solution? Or will that leave vbseo or anything else affected?

dartho 12-17-2008 08:29 PM

Yeah - I got that previous code quite wrong - try removing the '!' or try the following

Code:

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

by not havng the code there, SEO 'experts' suggest you are possibly diluting your Google ranking by having 2 domains publishing the same content (the two domains being www.yourdomain.com and yourdomain.com). My uneducated view is that in the case of a www prefix, google et al wouldn't be that dumb - but it's easy to do (when you know how) so it can;t really hurt.

ls7 12-18-2008 12:41 PM

Quote:

Originally Posted by dartho (Post 1687603)
Yeah - I got that previous code quite wrong - try removing the '!' or try the following

Code:

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

by not havng the code there, SEO 'experts' suggest you are possibly diluting your Google ranking by having 2 domains publishing the same content (the two domains being www.yourdomain.com and yourdomain.com). My uneducated view is that in the case of a www prefix, google et al wouldn't be that dumb - but it's easy to do (when you know how) so it can;t really hurt.

Hmmm. That code doesn't work, either. Possibly another typo somewhere?

dartho 12-20-2008 04:15 AM

As mentioned - I'm no expert in this rewrites .... how about:
Code:

RewriteCond %{HTTP_HOST} !^www\.ontrackdriver\.com [AND]
RewriteCond %{HTTP_HOST} !^m\.ontrackdriver\.com
RewriteRule (.*) http://www.ontrackdriver.com/$1 [L,R=301]

?

trainer 12-30-2008 02:58 PM

currently have this setup

http://www.site1.com/forums/

shares the forums with

http://www.site2.com/forums/

issue is i am not logged in when i goto the new site forums. everything else seems to be working fine

thanks

giorgiotave 01-05-2009 03:55 AM

Hi :)

I have some error:
Quote:

Warning: preg_match() [function.preg-match]: Unknown modifier 'f' in [path]/global.php(243) : eval()'d code on line 158
This product can be used with php4?

shahryar_neo 01-20-2009 04:45 PM

Quote:

Originally Posted by giorgiotave (Post 1702037)
Hi :)

I have some error:


This product can be used with php4?

i've a same problem !

yaku 01-20-2009 07:04 PM

Quote:

Originally Posted by giorgiotave (Post 1702037)
Hi :)

I have some error:

This product can be used with php4?

I had the same problem and saw this in the previous version:

Quote:

All fixed. The errors you were getting were caused by including "http://" with the domain name.

There is also no need to include "www"

For example, "myforum.com" will match "myforum.com" "www.myforum.com" and "wap.myforum.org" - the leading http:// is just a protocol declaration and not a part pf the domain name.
Go to 1) vBulletin Options
2) Different domain, different style
3) Domain Style?

Take out the www and the "http"

That fixed the problem for me.


Love this add-on...great stuff!


All times are GMT. The time now is 11:55 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.01342 seconds
  • Memory Usage 1,751KB
  • 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
  • (5)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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