Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



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

Posts: 1
Trades: 0
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
 
 
Register now for full access!
Old 06-19-2007, 02:52 AM Re: help with 301 Please
Junior Talker

Posts: 1
Trades: 0
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, 03:10 AM Re: help with 301 Please
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 06-22-2007, 07:44 PM Re: help with 301 Please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.highrankings.com/forum/in...1&#entry117701
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to help with 301 Please
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
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.14455 seconds with 12 queries