PDA

View Full Version : Our Pages Show as THREE URLS



squabbles
04-23-2008, 01:47 PM
* This wasn't a problem when I opened my Bluehost account years ago, but it is now-
So far, my editing in .htaccess only resolves one isse (See BELOW for Code).
(NOTE: SPACES INSERTED, to stop URLs from being active.)

* You register and use ONE.Com as your Primary Bluehost LOGON domain... and set up a page.
You have the ADDON Domain TWO.Com, and create another site.

TWO .com will show up as THREE URLS-
http://two .com (WHICH WE WANT)
AND
http://two .one .com
AND
http://one .com/two

* I can fix the 2nd one, with a .htaccess 404 redirect:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^two.one.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.two.one.com$
RewriteRule ^(.*)$ http://one.com/404.shtml [R=301,L]

* BUT
I'm STILL stuck with:
http://one .com/two
Duplicating my "two" page.

Nothing I've tried has fixed that.

IDEAS?

Thanks in advance, for any help.

areidmtm
04-23-2008, 02:00 PM
Put this in the .htaccess file in the two.com folder (remove any previous attempts from the main .htaccess file and this one)



RewriteCond %{HTTP_HOST} !^two.com$
RewriteRule ^(.*)$ http://two.com [R=301,L]


This will make it so that anyone going to two.one.com or one.com/two be redirected to two.com

squabbles
04-23-2008, 02:42 PM
Thanks much.

I should have explained myself more, earlier.

I don't want two.one.com or one.com/two to "EXIST"- Redirecting those to a 404, seems like the best option.

I'm concerned 1) Search engines may think I'm spamming for extra PageRank, but ALSO, 2) I don't want any connection between the 2 domains (which happens, with your code), for security and other reasons.

* Using this modification of the code, would seem to direct ALL SUBdomains for two.com to that 404:
RewriteCond %{HTTP_HOST} !^two.com$
RewriteRule ^(.*)$ http://one.com/404.shtml [R=301,L]

* HOW ABOUT:
RewriteCond %{HTTP_HOST} !^one.two.com$ [OR]
RewriteCond %{HTTP_HOST} !^www.one.two.com$
RewriteRule ^(.*)$ http://one.com/404.shtml [R=301,L]

(Thanks again, for the help!)