vBulletin Search Engine Optimization
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 ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
#61
| |||
| |||
| Sorry for the multiple posts... I am just working fast and furious. 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. 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> Last edited by GlitterKill; 11-25-2007 at 07:35 PM. |
|
#62
| ||||
| ||||
| 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. |
| Thread Tools | |
|
|
LinkBacks (?)
| ||||
| 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 |