coldfusion htaccess duplicate Google entries

2011-04-02 Thread Jeff InsuranceInventory

Hey guys/gals,
I use one host (Shared CrystalTech) to serve up multiple separate domains.

Trouble is Google has indexed:
1) http://MAINDOMAIN1.com/test.cfm
AND
2) http://MAINDOMAIN1.com/MAINDOMAIN1/test.cfm

I only want the first url to be indexed... but both urls above return 200 and 
dup. content.

My current htaccess implementation is:
RewriteCond %{HTTP_HOST} ^www\.MAINDOMAIN1\.com$ [NC]
RewriteRule ^(.*)$ http://MAINDOMAIN1.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} MAINDOMAIN1.com
RewriteCond %{REQUEST_URI} !MAINDOMAIN1/
RewriteRule ^(.*)$ MAINDOMAIN1/$1 [L]


Any ideas on how I can modify my htaccess to allow Link 1 but not allow Link 2. 
 I was unable to do it in cfapplication as the CGI and arguments.targetPage 
look exactly the same for both links 1) and 2).

Any thoughts for solving via htaccess?? 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343492
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: coldfusion htaccess duplicate Google entries

2011-04-02 Thread Dave Watts

 Hey guys/gals,
 I use one host (Shared CrystalTech) to serve up multiple separate domains.

 Trouble is Google has indexed:
 1) http://MAINDOMAIN1.com/test.cfm
 AND
 2) http://MAINDOMAIN1.com/MAINDOMAIN1/test.cfm

 I only want the first url to be indexed... but both urls above return 200 and 
 dup. content.

 My current htaccess implementation is:
 RewriteCond %{HTTP_HOST} ^www\.MAINDOMAIN1\.com$ [NC]
 RewriteRule ^(.*)$ http://MAINDOMAIN1.com/$1 [R=301,L]

 RewriteCond %{HTTP_HOST} MAINDOMAIN1.com
 RewriteCond %{REQUEST_URI} !MAINDOMAIN1/
 RewriteRule ^(.*)$ MAINDOMAIN1/$1 [L]

 Any ideas on how I can modify my htaccess to allow Link 1 but not allow Link 
 2.  I was unable to do it in
 cfapplication as the CGI and arguments.targetPage look exactly the same for 
 both links 1) and 2).

 Any thoughts for solving via htaccess??

No, but you can just block whatever you like in robots.txt. This will
be easier in any case.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343504
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: coldfusion htaccess duplicate Google entries

2011-04-02 Thread Jeff InsuranceInventory

Thanks Dave, I went your route.

After stepping away from the problem for half a day, I did think that perhaps 
changing the line of:
RewriteCond %{REQUEST_URI} !MAINDOMAIN1/
to
RewriteCond %{REQUEST_URI} !notexist/

might get the job done as well... basically shoving every request for that 
domain into that subfolder.. but for some reason it didn't like that.

Any other thoughts, the robots.txt will work according to Google's Webmasters 
blog... but thought I would still pose the question on properly structuring my 
htaccess.  Any idea why my change above didn't work.

Thanks for the help\! 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343508
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm