Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2013, 03:48 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default www.mysite.com and mysite.com

When you go to my homepage, if you type mysite.com, it goes to www.mysite.com. But if you go to mysite.com/forums/, it stays there.

Am I losing rankings as a result of this? How can I get it to go to www.mysite.com/forums/ ?

You can see it here: http://access-programmers.co.uk/forums/

Thanks,

Jon
Reply With Quote
  #2  
Old 10-14-2013, 06:06 PM
ikopylov's Avatar
ikopylov ikopylov is offline
 
Join Date: Aug 2010
Location: Russia
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

put .htaccess file to root of you site

with:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
All requests and ranking from http://www.you_site.com will be forwarded to the http://you_site.com
Reply With Quote
  #3  
Old 10-14-2013, 06:07 PM
futureaudio futureaudio is offline
 
Join Date: Mar 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to create a .htaccess file to redirect all your visitors to one version.

Add this code to the file if you want to redirect them to www version of your site:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Reply With Quote
  #4  
Old 10-14-2013, 07:38 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upload this to your root with your FTP program. Make sure you unzip it first
Attached Files
File Type: zip htaccess.zip (571 Bytes, 8 views)
Reply With Quote
  #5  
Old 10-15-2013, 11:13 AM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I already had this code in my htaccess file:

Code:
RewriteEngine On

# Externally redirect only direct client requests for /index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index.(html?|php)\ HTTP/
RewriteRule ^(([^/]+/)*)index.(html?|php)$ http://www.access-programmers.co.uk/$1 [R=301,L]
#
# Externally redirect to canonicalize the domain name if a non-canonical
# hostname is requested, in order to prevent duplicate-content problems
RewriteCond %{HTTP_HOST} !^(www\.access-programmers\.co.uk)?$
RewriteRule (.*) http://www.access-programmers.co.uk/$1 [R=301,L]
It seems to work for the root, but what is wrong with it because its not working for the forums. directory?
Reply With Quote
  #6  
Old 10-15-2013, 04:10 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jon12345 View Post
I already had this code in my htaccess file:

Code:
RewriteEngine On

# Externally redirect only direct client requests for /index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index.(html?|php)\ HTTP/
RewriteRule ^(([^/]+/)*)index.(html?|php)$ http://www.access-programmers.co.uk/$1 [R=301,L]
#
# Externally redirect to canonicalize the domain name if a non-canonical
# hostname is requested, in order to prevent duplicate-content problems
RewriteCond %{HTTP_HOST} !^(www\.access-programmers\.co.uk)?$
RewriteRule (.*) http://www.access-programmers.co.uk/$1 [R=301,L]
It seems to work for the route, but what is wrong with it because its not working for the forums. directory?
You have the same info in there twice use the one i uploaded
Reply With Quote
  #7  
Old 10-15-2013, 05:11 PM
Jon12345 Jon12345 is offline
 
Join Date: Nov 2002
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what I had in there was slightly different versions of the same thing? i.e. one of them was redundant?

I have a very long htaccess file due to Wordpress security plugins and cache. These have lots of RewriteRule entries and so I am concerned about adding many further entries in case it impacts on them. So, I would be concerned if I put all the entries in that @ForceHSS kindly included in the htaccess file. It also appears as though that file has other changes, such as perhaps changing members.php to perhaps members/. This could impact on my Wordpress install.

Is there something in my existing code that is stopping it working for the forums directory?
Reply With Quote
  #8  
Old 10-15-2013, 05:42 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are worried just add the top part of that file i uploaded the part that has the url but do keep a copy of the one you have now
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:55 AM.


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.04870 seconds
  • Memory Usage 2,254KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete