vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - Force www. (without .htaccess) (https://vborg.vbsupport.ru/showthread.php?t=222898)

1Unreal 09-09-2009 10:00 PM

Force www. (without .htaccess)
 
1 Attachment(s)
This mod will redirect users who do not have the www. subdomain to one that does. This helps with SEO as it stops duplicate content also fixes some logging in issues. Another upside is that this is done with pure PHP so you don't need to mess about with .htaccess.

There are no options, just upload it and it will redirect the users straight away.

Please post any issues and don't forget to click install!

HMBeaty 09-10-2009 06:23 PM

Nice thanks. Installed!

Mohsen71 09-10-2009 09:15 PM

thanks. Installed!

Eruantien 09-10-2009 10:27 PM

Sweet!

JVCode 09-10-2009 10:29 PM

Thank you, Installed.

yahoooh 09-10-2009 11:48 PM

i think it will affect any one use subdomains for vba links ,vbgallery and others

al-Rsha.com 09-11-2009 12:23 AM

I have a question that is ,
dose the mod effect sub domains
and the parked domains ;)

legion! 09-11-2009 03:27 AM

i installed this and i cannot log into my admin panel now because of it...it jus redirects me to my forumhome....

HMBeaty 09-11-2009 03:33 AM

Quote:

Originally Posted by legion! (Post 1882948)
i installed this and i cannot log into my admin panel now because of it...it jus redirects me to my forumhome....

Try disabling your modifications by placing this UNDER <?php in your includes/config.php file
PHP Code:

define('DISABLE_HOOKS'true); 

Then go to your AdminCP and uninstall

legion! 09-11-2009 03:44 AM

i jus did that...and it didnt work...all my hacks and stuff are still workin...and i cant log into the CPanel

New Joe 09-11-2009 09:59 AM

Anyone else have this same problem?

legion! 09-11-2009 10:31 AM

im still locked out of my panel...is there anyway to reverse this

choccyclaire 09-11-2009 11:05 AM

Try accessing your site via your ip?

Hostboard 09-11-2009 04:36 PM

Most likely this is cached in your browser. You can try:

1. Clear browsers cache and cookies
2. Try another browser
3. Force a refresh (F5, ctrl r, etc.)

Brandon Sheley 09-11-2009 05:00 PM

I would suggest you also change this in google webmaster tools as well :)

1Unreal 09-11-2009 11:55 PM

Quote:

Originally Posted by yahoooh (Post 1882885)
i think it will affect any one use subdomains for vba links ,vbgallery and others

Yes it will.

Quote:

Originally Posted by al-Rsha.com (Post 1882898)
I have a question that is ,
dose the mod effect sub domains
and the parked domains ;)

It will effect sub-domains as www is a sub domain.

Quote:

Originally Posted by legion! (Post 1882954)
i jus did that...and it didnt work...all my hacks and stuff are still workin...and i cant log into the CPanel

Try going to http://www.yoursite.com/cpanel instead of http://cpanel.yoursite.com/

Chuta 09-13-2009 01:29 AM

Good Bye Login Problems!!

ag24 09-13-2009 05:20 AM

nice work,tnx
installed...

ravi_9793 09-13-2009 05:33 PM

Thanks, working. :)

Manoel J?nior 09-13-2009 07:13 PM

Very, very, very Thanks!!!!

Great my bro!

MissKalunji 09-15-2009 12:49 AM

Seems to be working perfectly!

Thank you!

hpidriver 09-15-2009 10:01 PM

Just to make sure, i upload this as a product???

MissKalunji 09-15-2009 10:51 PM

Yep as a product

cosy 09-17-2009 06:11 PM

dont working for me

vboptimize can be a problem ?

MissKalunji 09-17-2009 09:03 PM

it could be

EagleNick 09-19-2009 11:40 AM

How does this mod work, exactly? People have been asking in this thread on another site: http://www.adminaddict.net/forum/vbu...mization-3471/

MoMan 09-23-2009 04:04 AM

FYI if I try to access my site via IP, the www. is still appended, thus making the site inaccessible. Might want to make a conditional to get around that somehow!

MoMan 09-23-2009 04:40 AM

Fixed this by wrapping the entire plugin code in this conditional:

PHP Code:

$pos strpos($_SERVER['HTTP_HOST'],'*your website IP address here*');
if (
$pos === false)
{*
plugin code here* }
else
{} 


bigcurt 09-27-2009 04:24 AM

^^ I concur with what he said, just checked it on my site as well.

teuor 09-27-2009 06:56 AM

nice work, thanks

Entonadoscl 10-19-2009 02:24 AM

thanks ;)

nonspin 10-24-2009 12:13 AM

.. just for ticks and for those who prefer the proper .htaccess method

Code:

# Redirect adding leading www.to domain or any subdomain if missing
# RewriteEngine On 
RewriteCond %{HTTP_HOST} !^www..
Rewriterule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Remove "#" from RewriteEngine On if not present

Quantnet 10-24-2009 11:21 AM

How does this mod work without the .htaccess modification? I'm curious.

1Unreal 10-24-2009 12:27 PM

Quote:

Originally Posted by Quantnet (Post 1905539)
How does this mod work without the .htaccess modification? I'm curious.

Well using PHP you can get the current URL of a page and you can redirect. Simple :)

AdamCap 01-02-2010 07:28 PM

I was a little worried about installing this after reading some of the comments with troubles...but it works perfectly for me! I couldn't get my .htaccess to redirect, so this is awesome. :)

I think my .htaccess redirect problems might have have something to do with wordpress. It's installed in my root and automatically redirects all wordpress pages to www, so for some reasons adding the code to redirect in htaccess wouldn't redirect vBulletin which is in a folder off the root.

EliasAlucard 01-25-2010 01:15 AM

This plugin is not working properly.

KyleWhitey 01-27-2010 01:19 AM

installed, awesome dude thx

CORSO 02-19-2010 03:18 PM

work with 4.0.2?

MrPHD 02-19-2010 04:19 PM

This mod run on vbulletin 4.0.x version.

ravenfaust 02-21-2010 06:13 PM

not working for me, stays without www.


All times are GMT. The time now is 10:04 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.01323 seconds
  • Memory Usage 1,781KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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