vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   www.mysite.com and mysite.com (https://vborg.vbsupport.ru/showthread.php?t=303398)

Jon12345 10-14-2013 03:48 PM

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

ikopylov 10-14-2013 06:06 PM

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

futureaudio 10-14-2013 06:07 PM

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]


ForceHSS 10-14-2013 07:38 PM

1 Attachment(s)
Upload this to your root with your FTP program. Make sure you unzip it first

Jon12345 10-15-2013 11:13 AM

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?

ForceHSS 10-15-2013 04:10 PM

Quote:

Originally Posted by Jon12345 (Post 2453548)
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

Jon12345 10-15-2013 05:11 PM

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?

ForceHSS 10-15-2013 05:42 PM

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


All times are GMT. The time now is 05:35 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.01118 seconds
  • Memory Usage 1,732KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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