Real Estate Forums

Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here.

Reply
 
Thread Tools Display Modes
Old 07-11-2007, 01:47 PM
Dave Kovaleski's Avatar
Dave Kovaleski Dave Kovaleski is offline
Real Estate Web Guru
 
Join Date: Jan 2007
Posts: 344
Dave Kovaleski is on a distinguished road
Default hta access part 2

My hta file was simply to prevent the non www version of my site and to keep the index.html page from being index so that only my www,homepage.com was considered my home page not www,homepage.com/index here is what my htaccess file said:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^poconohomesource\.com [NC]
RewriteRule ^(.*)$ http://www.poconohomesource.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html /$1 [R=301,L]

for some reason I was getting ver very strange search results whne this file was uploaded. I would sometimes not show up at all, and sometimes would show up on soome page in the 50's which was terrible. Finaly after removing the htaccess file completely and waiting throuhg several crawls I am now at leats on page 6-7.

What was wrong with this htaccess file?
__________________
Dave Kovaleski REALTOR
Pocono Pennsylvania Real Estate Agent
Pocono Real Estate
Pocono Homes
Lake Wallenpaupack Real Estate
Reply With Quote
Old 07-16-2007, 12:42 PM
langard langard is offline
Real Estate WebMaster
 
Join Date: Apr 2006
Posts: 208
langard is on a distinguished road
Default Re: hta access part 2

All you need to accomplish what you want is:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^poconohomesource\.com [NC]
RewriteRule ^(.*)$ http://www.poconohomesource.com/$1 [L,R=301]

What are you trying to do with the second set of conditions and rules?
__________________
LanGard MicroDevelopers Oregon Real Estate Agent and Company Directory
Reply With Quote
Old 07-17-2007, 07:01 AM
Dave Kovaleski's Avatar
Dave Kovaleski Dave Kovaleski is offline
Real Estate Web Guru
 
Join Date: Jan 2007
Posts: 344
Dave Kovaleski is on a distinguished road
Default Re: hta access part 2

I thought I needed to instruct the crawlers to NOT use the www poconohomesoucre.com/index.html page of my site as the main page and to only use the www poconohomesource.com version to prevent duplicate content between the two.. Thats what I thought the last instruction set did.
__________________
Dave Kovaleski REALTOR
Pocono Pennsylvania Real Estate Agent
Pocono Real Estate
Pocono Homes
Lake Wallenpaupack Real Estate

Last edited by Dave Kovaleski; 07-17-2007 at 07:03 AM.
Reply With Quote
Old 07-17-2007, 08:43 AM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
Real Estate Webmaster
 
Join Date: Jun 2004
Posts: 4,726
ResaleBroker is on a distinguished road
Default Re: hta access part 2

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index(.*)\ HTTP/
RewriteRule ^index(.*)$ http://www.poconohomesource.com [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.poconohomesource\.com [NC]
RewriteRule ^(.*) http://www.poconohomesource.com/$1 [L,R=301]
Reply With Quote
Old 07-17-2007, 05:10 PM
Dave Kovaleski's Avatar
Dave Kovaleski Dave Kovaleski is offline
Real Estate Web Guru
 
Join Date: Jan 2007
Posts: 344
Dave Kovaleski is on a distinguished road
Default Re: hta access part 2

so this code will force the use of the .com version and block the use of the .com/inex.html for the home page and will also force the use of the www. version of the site rather than the non www. version?

Thanks guys for the help!
__________________
Dave Kovaleski REALTOR
Pocono Pennsylvania Real Estate Agent
Pocono Real Estate
Pocono Homes
Lake Wallenpaupack Real Estate

Last edited by Dave Kovaleski; 07-17-2007 at 05:14 PM.
Reply With Quote
Old 07-17-2007, 05:16 PM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
Real Estate Webmaster
 
Join Date: Jun 2004
Posts: 4,726
ResaleBroker is on a distinguished road
Default Re: hta access part 2

Quote:
Originally Posted by PoconoREALTOR View Post
so this code will force the use of the .com version and block the use of the .com/inex.html for the home page and will also force the use of the www. version of the site rather than the non www. version?
Yes.
Reply With Quote
Old 07-17-2007, 06:01 PM
langard langard is offline
Real Estate WebMaster
 
Join Date: Apr 2006
Posts: 208
langard is on a distinguished road
Default Re: hta access part 2

It's always good idea to clean up all your internal links also. You can run a search and replace to make sure all your home page links conform to www.YourDomain.com/ instead of YourDomain.com/index.html or www.YourDomain.com/index.html .

If you have IBLs, encourage them to do the same wherever possible.
__________________
LanGard MicroDevelopers Oregon Real Estate Agent and Company Directory
Reply With Quote
Old 07-17-2007, 06:06 PM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
Real Estate Webmaster
 
Join Date: Jun 2004
Posts: 4,726
ResaleBroker is on a distinguished road
Default Re: hta access part 2

Quote:
Originally Posted by PoconoREALTOR View Post
so this code will force the use of the .com version and block the use of the .com/inex.html for the home page and will also force the use of the www. version of the site rather than the non www. version?
To clarify, the code I provided is for 301 Redirects.
Reply With Quote
Old 07-21-2007, 11:32 AM
Dave Kovaleski's Avatar
Dave Kovaleski Dave Kovaleski is offline
Real Estate Web Guru
 
Join Date: Jan 2007
Posts: 344
Dave Kovaleski is on a distinguished road
Default Re: hta access part 2

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index(.*)\ HTTP/
RewriteRule ^index(.*)$ http://www.poconohomesource.com [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.poconohomesource\.com [NC]
RewriteRule ^(.*) http://www.poconohomesource.com/$1 [L,R=301]

This code messed me all up. I have a second website under the same web server and this code redirected even that site. whne i went to my site www demanddave.com it automtically went to www poconohomesource.com/demanddave instead of www demanddave.com which was very very very bad.

google webmaster tools started giving me all the page not found errors from the demand dave website even thouhg i was on my web tools for poconohomesource.

I still need the proper code to simply make my home page be www poconohomesource.com with out the /index.html and to force the use of the www. version of the site.

Thanks in advance.
__________________
Dave Kovaleski REALTOR
Pocono Pennsylvania Real Estate Agent
Pocono Real Estate
Pocono Homes
Lake Wallenpaupack Real Estate

Last edited by Dave Kovaleski; 07-21-2007 at 11:35 AM.
Reply With Quote
Old 07-21-2007, 12:18 PM
langard langard is offline
Real Estate WebMaster
 
Join Date: Apr 2006
Posts: 208
langard is on a distinguished road
Default Re: hta access part 2

Well let's see, where'd you put the .htaccess file? It should be in the root directory for poconohomesource.com, not in the directory above it. Sounds like you've got it in the 'www' directory.

.htaccess files only control the directory they're in and the subdirectories below. Unless you've got demanddave.com in a subdirectory of poconohomesource.com for some unknown reason, it shouldn't effect it at all if it's in the right place.

Try the HTTP_HOST rewrite conditions/rules alone like I suggested before and see if you have the same problem. Have you got:
Options +FollowSymLinks
RewriteEngine on
prefacing the conditions and rules?

What's the Principle Domain of Record on your virtual server? Pocono...or Dave?
__________________
LanGard MicroDevelopers Oregon Real Estate Agent and Company Directory
Reply With Quote
Reply


Thread Tools
Display Modes

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

For our members

Main Sections

IDX Coverage Areas

Spiders Welcome

All times are GMT -7. The time now is 05:22 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.