vBulletin Search Engine Optimization
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 ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| .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. |
|
#2
| ||||
| ||||
|
#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 |
|
#3
| |||
| |||
|
so it's okay to have 2 htaccess files? (one in the main directory and this one in the /forum directory?).
|
|
#4
| ||||
| ||||
|
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 |
| Thread Tools | |
| |
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 |