vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Team: Hot or Not? Ready for Traffic Explosion? vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! vBSEO Helps Forum Earn $100/day from Google AdSense Discover the Power of "Long Tail Search" Crawlability Inc. Files for SEO Technology Patent
se sw

301 Redirecting Domains

This is a discussion on 301 Redirecting Domains within the General Discussion forums, part of the vBulletin SEO Discussion category; Sorry for the multiple posts... I am just working fast and furious. This is the code I am now using ...

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

Enhancing 80 million pages.

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

 

LinkBack (1) Thread Tools
  #61  
Old 11-25-2007, 07:14 PM
Member
 
Real Name: Gary Mullins
Join Date: Jan 2006
Location: Nashville, TN
Posts: 65
Sorry for the multiple posts... I am just working fast and furious. This is the code I am now using to forward non-www incoming traffic to PCApex.com - Hardware Reviews, News &; Mods and it works! First time I have got a url rewrite to work in the root folder. Here is the code I am using:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

ErrorDocument 401 /errordocs/401.htm
ErrorDocument 403 /errordocs/403.htm
ErrorDocument 404 /errordocs/404.htm
ErrorDocument 500 /errordocs/500.htm

<FilesMatch "\.(gif|png|mp3|jpg|rar|zip|exe|php)$">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</FilesMatch>

So, I wonder if there is a way to use that sort of syntax in the domain rewrites since this set of code actually works.

EDIT // Getting closer! This time I got this error, it did rewrite both the non-ww and the domain from pimprig to pcapex but I received this error in FireFox when I loaded the url:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.


* This problem can sometimes be caused by disabling or refusing to accept
cookies.

Here is the code I used to get that far.

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTP_HOST} !^pcapex\.com
RewriteRule ^(.*)$ http://www.pcapex.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

ErrorDocument 401 /errordocs/401.htm
ErrorDocument 403 /errordocs/403.htm
ErrorDocument 404 /errordocs/404.htm
ErrorDocument 500 /errordocs/500.htm

<FilesMatch "\.(gif|png|mp3|jpg|rar|zip|exe|php)$">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</FilesMatch>

FINAL EDIT //
Woohoo! After alot of trial and error I finally got the root folder/URLs to redirect! Now a visitor can follow a link to something like pimprig.com/advertising.php and they will be forwarded to PCApex.com - PC Apex Advertising! Thanks for all of your help. I am now going to setup a redirect from www.subdomain.pcapex.com to subdomain.pcapex.com. I have been running with all these urls pointing to the same content for over a year now and have not noticed any penalties from Google. Instead of tempting fate I decided to fix the issue. Here is the code I ended up with for the root folder .htaccess:

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.pcapex\.com
RewriteRule ^(.*)$ http://www.pcapex.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

ErrorDocument 401 /errordocs/401.htm
ErrorDocument 403 /errordocs/403.htm
ErrorDocument 404 /errordocs/404.htm
ErrorDocument 500 /errordocs/500.htm

<FilesMatch "\.(gif|png|mp3|jpg|rar|zip|exe|php)$">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</FilesMatch>
__________________
Admin, http://www.pcapex.com and http://www.gameapex.com

Last edited by GlitterKill; 11-25-2007 at 07:35 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #62  
Old 03-16-2008, 11:51 AM
Joe Ward's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Joseph Ward
Join Date: Jun 2005
Location: Puerto Rico
Posts: 17,393
Blog Entries: 7
New resource:
[How to] Setup www.yourdomain.com or yourdomain.com (www vs. non-www) - With .htaccess 301 redirects
__________________
Joe Ward / 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.

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
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.vbseo.com/f4/301-redirecting-domains-5061/

Posted By For Type Date
Logout Sorunu - Bütün üyeler tekrar login olmak zorunda - Webmaster Forum & Webmaster Okulu Post #2 Pingback 04-09-2008 05:00 PM

Similar Threads

Thread Thread Starter Forum Replies Last Post
Redirecting Custom Rewrites outside forum folder vissa Bug Reporting 7 03-10-2006 05:55 PM
301 homepage Ashley General Discussion 2 02-15-2006 05:34 AM
301 Redirects .. built in? Ace Shattock General Discussion 1 09-30-2005 11:18 AM


All times are GMT -4. The time now is 09:11 PM.


Powered by vBulletin Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.