Reply
help with 301 Please
Old 06-18-2007, 07:06 PM help with 301 Please
Junior Talker

Posts: 1
Hello All

I am new here and have a rather painful question. I have searched and searched for the answer.

I have a site that is about 1 year old. Despite all my best efforts and many errors it ranks #50 to 70 for my main key words but pages 1, 2 or 3 for most of my secondary.

I have had many double indexing problems from the beginning some from linking errors, etc. One problem has occurred because my demo store contained links that link to the hosts server pages.

I am indexed as www.mydomain.com as well as www.mydomain.myhostsname.com. The host address is in the supplemental index in google but in MSN some of those pages actually rank higher than my .com pages.


My Windows IIS host said that they would put in some kind of no follow code but I constantly keep getting linked to by these google ad pages that are linking the the hostname address. I still have my entire site indexed under both domains.

Does this make sense to you? The platform is template style. I do have access to the template html files but not the .asp files.


I found the following code to use regarding the www vs non www version pages (which I also have a problem with but only in MSN as far as I know)
I need some sort of asp rewrite that will address both issues.

Dim Domain_Name, theURL, QUERY_STRING, HTTP_PATH
Domain_Name = lcase(request.ServerVariables("HTTP_HOST"))
if domain_name <> "www.example.com" Then
HTTP_PATH = request.ServerVariables("PATH_INFO")
If Left(HTTP_PATH, = "/default" Then
HTTP_PATH = ""
End If
QUERY_STRING = request.ServerVariables("QUERY_STRING")
theURL = "http://www.example.com" & HTTP_PATH
if len(QUERY_STRING) > 0 Then
theURL = theURL & "?" & QUERY_STRING
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", theURL
Response.Flush
Response.End
end if

As I said host used Windows IIS so you cannot use an htaccess file. This code is to be saved as a file named "redirect.asp" and then added to the top of each file on the site with the following snippet:

<!-- #Include file="redirect.asp" -->


Does anyone know of such a code. I want it to be safe. I can't seem to get rid of these stupid duplicate addresses. My host does not have a rewrite ini file.

Thanks in advance for your input.

Bomy
bomy is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-19-2007, 01:52 AM Re: help with 301 Please
Junior Talker

Posts: 1
Ask your hosting provider if they can support IIS Mod-Rewrite Pro. It's fully compatible with mod_rewrite and also supports .htaccess (yes, you read well .htaccess on IIS). You will do your work as easy as you would do with apache
stan is offline
Reply With Quote
View Public Profile
 
Old 06-19-2007, 02:10 AM Re: help with 301 Please
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
The code above should work, assuming you swap out "example.com" with your actual URL. The web spiders won't know how you generated the 301, whether it's ASP, PHP, .htaccess, or some other means.

It might take them a few months to sort everything out, but they will.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 06-22-2007, 06:44 PM Re: help with 301 Please
chrishirst's Avatar
Super Moderator

Posts: 13,472
Location: Blackpool. UK
http://www.highrankings.com/forum/in...1&#entry117701
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to help with 301 Please
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12817 seconds with 12 queries