The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
put .htaccess file to root of you site
with: Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
|
|
#3
|
|||
|
|||
|
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]
|
|
#4
|
|||
|
|||
|
Upload this to your root with your FTP program. Make sure you unzip it first
|
|
#5
|
|||
|
|||
|
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]
|
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
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? |
|
#8
|
|||
|
|||
|
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
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|