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>



LinkBack URL
About LinkBacks
This is the code I am now using to forward non-www incoming traffic to 





Reply With Quote