Real Estate Forums
| Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here. |
![]() |
|
|
Thread Tools | Display Modes |
|
||||
|
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 |
|
|||
|
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 |
|
||||
|
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. |
|
||||
|
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. |
|
|||
|
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 |
|
||||
|
To clarify, the code I provided is for 301 Redirects.
|
|
||||
|
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. |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|