vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
New vBSEO Discount Level for Network Builders Meet vBSEO Team in New York (Nov. 3rd & 4th) vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

.htaccess question

This is a discussion on .htaccess question within the General Discussion forums, part of the vBSEO SEO Plugin category; so in my main directory, i have this for my .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^domainname.com RewriteRule (.*) http://www.domainname.com/$1 ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > General Discussion

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-10-2007, 06:40 PM
Junior Member
 
Real Name: Johnny
Join Date: Jun 2006
Posts: 12
.htaccess question

so in my main directory, i have this for my .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domainname.com
RewriteRule (.*) http://www.domainname.com/$1 [R=301,L]

but then i noticed that if i removed the www from the forum link, it wouldn't redirect to the www (would explain why some members found themselves logged out?)

and then i noticed there is an .htaccess file in my forum directory. is there suppose to be one? this is what it has:

# 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\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]



is there anything i need to change? i just moved servers and things were really screwy after the move.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 09-10-2007, 11:16 PM
Michael Biddle's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Michael Biddle
Join Date: Jan 2007
Location: Southern California
Posts: 2,902
Blog Entries: 5
#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

Remove the # and it should always make it add the www. to the beginning.

Be sure you change yourdomain with your current one
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 09-11-2007, 09:16 PM
Junior Member
 
Real Name: Johnny
Join Date: Jun 2006
Posts: 12
so it's okay to have 2 htaccess files? (one in the main directory and this one in the /forum directory?).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 09-11-2007, 10:29 PM
Ace Shattock's Avatar
vBSEO Staff
vBSEO Total Customer SupportCommunity Builder
 
Real Name: Ace Shattock
Join Date: Jul 2005
Location: New Zealand
Posts: 2,881
Johnny,

.htaccess files affect the folder they are in and all folders under that folder UNLESS a sub-folder contains its own .htaccess file, in which case that file will override completely the parent folder's .htaccess.
__________________
Ace Shattock / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.


My Personal Sites: New Zealand Forum | vBulletin Modifications and Styles | vBulletin Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Hotlink Protection Tutorial (Apache Server - .htaccess files) NeutralizeR Member Articles 13 11-20-2008 04:53 AM
.htaccess confusion! rlpartida General Discussion 11 06-29-2007 10:13 PM
installing sitemap .htaccess question sovaward General Discussion 19 12-22-2006 04:00 PM
.htaccess question Aneurysm General Discussion 1 12-05-2006 03:55 PM


All times are GMT -4. The time now is 11:24 AM.


Powered by vBulletin Version 3.8.0 Beta 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.