The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Different Domain, Different Style Details »» | |||||||||||||||||||||||||
This is a simple add-on which will force users to a specific style based on the url the user visited.
I wrote this with the idea of being able to create a subdomain of mobile.domainname.com and have visitirs to that URL forced to a mobile style whilst visitors to my normal site (domainname.com or www.domainname.com) would be rpesented with my regular style. Alternatively if you have 2 domain names which point to the same forum, you can have a customized style based on the domain name visited. You can do what you want, but it may be as simple as only having a different banner reflecting the host name visited, or if you have merged 2 forums - users could still get the same skin they always have had if they continue to visit the same URL. With the HOST matching be aware that if the URL specified in the add-on matches anywhere in the url visited, the add-on will be triggered. e.g. if URL specified in add-on = domainname.com, any subdomains of domainname.com will match this. Version Information 1.0.0 - Initial release ported from 3.6 version 1.0.1 - Fixed missing Setting Group Name product-ddds37.xml supports a single additional domain product-ddds37_5-domain-version.xml supports one to five additional domains To upgrade, simply import and allow overwrite. Show Your Support
|
Comments |
#92
|
|||
|
|||
Quote:
# 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] |
#93
|
|||
|
|||
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] 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] 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 |
#94
|
|||
|
|||
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? |
#95
|
|||
|
|||
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] |
#96
|
|||
|
|||
Quote:
|
#97
|
|||
|
|||
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] |
#98
|
|||
|
|||
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 |
#99
|
|||
|
|||
Hi
I have some error: Quote:
|
#100
|
|||
|
|||
i've a same problem !
|
#101
|
|||
|
|||
I had the same problem and saw this in the previous version:
Quote:
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! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|