When A Url Results In A Temporary Redirect (http 302), What Gets Indexed

Jan 5, 2010

I'm trying to make our (very heavily AJAX based) website more search engine friendly.We have a system where certain urls redirect to the main page after setting session variables to change the behavior of the main page. This is acheived using the Controller.Redirect method to create an ActionResult.

So for instance, the main page is:

http://radiotuna.com

but if we want to link to a radio station, we use:

http://radiotuna.com/s/66258

which redirects to the main page. However in this case, the displayed content is different due to Session variables that were set prior to the redirect.

What will be indexed by web crawlers when presented with this redirect?

Will Session be preserved in this case?

As far as I can tell there are a few possible outcomes:

crawler follows redirect, session info is preserved, crawled data is associated with http://radiotuna.com/s/66258 (the desired outcome)

crawler does not follow redirect. If we can send a page with the 302, this is OK-ish. Is this permitted?

crawler follows redirect, session info is preserved, crawled data is associated with http://radiotuna.com/ (bad)crawler follows redirect, but session info is discarded, so main (unmodified page) is associated with http://radiotuna.com/s/66258 (bad)

Perhaps a 302 is the wrong status to send back. Perhaps the idea of using redirects in this case is flawed.

EDIT: Why are we doing this? Ideally we'd like only a single URL to appear in the address bar, so we'd like to always redirect to the main page. When coming in from a redirect, this would result in a different title and meta description and it is this that we'd like to be picked up by the crawler and associated against the pre-redirect url.

EDIT2: Would it be better to detect if we're being hit by a crawler and to deliver the page without redirect in this case? How might one detect crawler clients?

View 3 Replies


Similar Messages:

HttpHandlers / Modules :: Redirect A Page From Http To Https Using Http Module Begin Request Handler?

Jul 15, 2010

i redirect a page from http to https using http module begin request handler .i am calling webservice using ajax but it is saying webserice not defined .which otherwise works fineits work fine when rediect page in page_load instead .but i need to add function for https to http in every page. i still not know why ajax is not working when i use http module for redirect

View 3 Replies

Web Forms :: How To Redirect The Site To Http://example.net To Http://www.example.net

Aug 3, 2010

I am facing problem in to redirect my site from http://example.net to http://www.example.net

When the user can enter the site name in address bar like http://example.net how can i automatically redirected to http://www.example.net

I am trying to change the properties in iis but it doesnot work.

how can i acheive this

View 3 Replies

How To Redirect Http To Https

Feb 9, 2010

I want to redirect http to https. I tried this one,but I have one problem, I have to redirect to another page. The request.url gives the current page, whereas I need to redirect to another page. How do I do that.

if(!Request.IsSecureConnection)
{
string redirectUrl = Request.Url.ToString().Replace("http:", "https:");
Response.Redirect(redirectUrl);
}

View 2 Replies

Cannot Redirect After HTTP Headers Have Been Sent?

Feb 14, 2011

I have created one page to show the progress of payment . After successful payment i need to redirect user to the payment confirmation page. When i am redirecting am getting the following error.

Cannot redirect after HTTP headers have been sent.

[Code]....

View 6 Replies

Http - Make 301 Permanent Redirect?

Jan 21, 2011

how to make 301 permanent redirect in asp.net?

I have written code in Global.asax file but my web client says it is not working,

i have written follwing code in Global.asax file:

protected void Application_BeginRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Request.Url.ToString().ToLower().Contains(
"http://lsatfreedom.com"))
{
HttpContext.Current.Response.Status =
"301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location",
Request.Url.ToString().ToLower().Replace(
"http://lsatfreedom.com",
"http://www.lsatfreedom.com"));
}
}

View 4 Replies

Security :: HTTP Post Does Not Redirect To Next Page?

Jun 2, 2010

I have created login for site. I am using "UserLogin.ascx" which is placed in masterpage. Now I have to create the Login system so that the users from other sites login to my site through Http post or Get. I have created the page for sending "HTTP Post" to my site and it also login to my site, but when I click on any link it logs out also in the browser's address bar the URL of the previous site is shown.

View 3 Replies

Web Forms :: SSL: Http To Https Redirect Loop?

May 3, 2010

I'm having real trouble redirecting pages from http to https on my live website. Everything is fine on my IDE but as soon as I upload it to my shared web host (123-reg.co.uk) I hit a problem. When I try to redirect to https using Response.Redirect it seems a loop occurs and the request is never carried out.

The code I've tried:

[Code]....

and

[Code]....

Both above methods worked fine in my IDE but not on my live system.

In IE nothing happens but in Firefox the below error is displayed:

"Firefox has detected that the server is redirecting the request for this address in a way that will never complete. "

View 9 Replies

MVC :: Redirect To Page From Url Like This - Http://domainname.com/username/?

Jul 24, 2010

I am working in a new project. It's a multi level marketing system. The client forwarded on requirement in his SRS. It's coming like this,

One customer registers with the companyCompany provides one username(myusername)Also company provides a link to the customer like -

http://domainname.com/username/ ie
http://domainname.com/myusername/

If a guest visits the site by using the above mentioned url, the registered user gets an email like one person from the following ip and country visited your website.


if we create folders under the website for the usernames it will be huge in number. Is there any other way to do this.

This is Asp.Net 3.5 + MSSQL 2008. So how can we track it from the url itself.

View 2 Replies

Iis - Using Setup A Component To Redirect Response For Any HTTP Requests?

Aug 25, 2010

The objective of this component is to be able to forward whatever HTTP requests it receives to forward to a different server based on the parameters but keeping the URL and POST data intact. For example:

If the component receives

[URL]

It will return the response from either

[URL]

where XYZ can be valid name of the page. I think I can probably individually create each page to do a Response.Redirect but i am wondering if there is a more generic way to do this? In addition, is this something I have to configure on the IIS level rather than code level?

View 1 Replies

MVC :: Redirect Action Not Working In Jqgrid Action Results Method

Mar 23, 2011

I am desiging a master and details page from a search page..user can search for something and I need to display the result in jqgrid if the result has more than 1 row or record.. if the result is just one record then i have to directly send then to details page by skiping grid page... I do have an action method for results page and one more action method for Jqgrid data..i am trying to check the row count for the database result and trying to redirect to details action results..but its not working at all..and showing an empty jqgrid..

[Code]....

View 9 Replies

C# - Response.Redirect Results In "Object Moved To Here"?

Feb 2, 2010

I'm working on a C# ASP.NET page that normally ends up redirecting to a "file:" URL. This seems to work fine the majority of the time, in the majority of circumstances, but occasionally (and, on my test system, apparently always) instead of a redirect to a file I get a page with the text "Object moved to here", where "here" is a link to the file that I was trying to redirect to, but with four slashes after the colon instead of two (i.e. "file:////testserver/docs/testdoc.doc")This is normally accompanied by a "System.Threading.ThreadAbortException: Thread was being aborted" message.

I've looked for a solution elsewhere and found out some interesting stuff about Response.Redirect causing ThreadAbort exceptions, but that doesn't seem to be the fundamental problem - it seems to me that the actual problem is the "Object moved to here" message, which causes the exception to be thrown.

EDIT: Forgot to mention I'm running Firefox (3.5.7) with IE Tab, so was about to mention that when I thought I'd better try it in IE, and voila - it works in IE (7).

View 1 Replies

HTTP POST, Redirect To JSP/ColdFusion,best Server Side Or Client Side?

Jan 25, 2010

I want to post data to another server (JSP or ColdFusion).

Note:Post which means the data is required at the another server also the browser should be redirected automatically.Is it better to use form tag...input type hidden fields, values...

and from javascript

form.submit();

[code]...

I should use WebClient class?Please provide the points from Security view also.

View 1 Replies

Web Forms :: Class Cannot Be Indexed Because It Has No Default Property?

Dec 6, 2010

What am I doing wrong here?

Me("Label" & CStr(i)).Text = strURI.Substring(strURI.ToString().LastIndexOf("/") + 1) & ": " & intCount.ToString()

[Code]....

I get an error on Me; it indicates that it cannot be indexed because it has no default property

View 5 Replies

Setting Indexed Columns On A Custom SQL Table

Jul 22, 2010

I've read about primary, unique, clustered indexes etc. But I need to understand it via an example.

The image below is the auto-generated aspnet_Users table captured from SQL Server Web Admin Panel.

Taking this as a model; I will create a custom table called Companies and let's say the fields are: ID, Name, ShortName, Address, City, Country.. No values can be duplicate for ID, Name and ShortName fields.

What is your approach on creating indexes for this table? Which should be clustered or non-clustered? Are indexes below logical to you?

Index Columns Primary Unique Clustered ign.Dup.Keys Unique Key
------------------------------------------------------------------------------------------
PK_ID ID True True False False False
Comp_Index Name,ShortName False True True False False

View 3 Replies

Databases :: Bad SQL Query Or Tables Not Indexed Properly?

Sep 29, 2010

will bad SQL query or tables not indexed properly cause any problem when we execute it? or it may just take more time to execute??

View 3 Replies

System Data Dataset Cannot Indexed Because It Has No Default Property

Aug 18, 2010

I have built a site and worked fine for me, when I passed to a collegaue to deploy into another site he gets the message in subject.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not getQueryString("post") = 0 Then
postID = Request.QueryString("post")
BlogAdmin1.Buttontext = "Edit Blog"
Dim MyCommand As SqlCommand
Dim myAdapter As SqlDataAdapter
Dim ds As DataSet = New DataSet
Dim myUpdateconnection As SqlConnection = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("conn"))
MyCommand = New SqlCommand("ADMIN_BLOG_SELECT_POSTBYID", myUpdateconnection)
MyCommand.CommandType = CommandType.StoredProcedure
MyCommand.Parameters.Add(New SqlParameter("@postID", SqlDbType.Int))
MyCommand.Parameters("@postID").Value = postID
MyCommand.Connection.Open()
Try
myAdapter = New SqlDataAdapter(MyCommand)
myAdapter.Fill(ds, "postData")
Catch exp As SqlException
Response.Write(exp.ToString())
End Try
If Not ds Is Nothing AndAlso Not ds.Tables(0) Is Nothing AndAlso ds.Tables(0).Rows.Count > 0 Then
BlogAdmin1.BlogTitle = nullToStr(ds.Tables(0)(0)("title"))
BlogAdmin1.BlogBody = nullToStr(ds.Tables(0)(0)("body"))
BlogAdmin1.BlogCategory = nullToInt(ds.Tables(0)(0)("category"))
End If
MyCommand.Connection.Close()
LoadData()
Else
Response.Redirect("/admin/blogs.aspx", False)
End If
End If
End Sub

It errors here

BlogAdmin1.BlogTitle = nullToStr(ds.Tables(0)(0)("title"))

View 8 Replies

Forms Data Controls :: Datagrid Bind To Indexed Property?

Aug 5, 2010

I'm trying to bind indexed property to the datagrid control.

Here is my class which has a normal property ('p0') and 2 indexed properties ('p1' & 'p2'). I need to bind p1 and p2 as column in the datagrid.

[Code]....

View 2 Replies

Class 'System.Web.UI.WebControls.TableRow' Cannot Be Indexed Because It Has No Default Property.

Mar 11, 2011

What i am having trouble doing is set the current parameter to the current row at a specific column like e.row[column index]

For Each trow As TableRow In table.Rows

cmd1.CommandText = "dbo.directway"
cmd1.CommandType = CommandType.StoredProcedure
cmd1.Connection = conn [code]....
Class 'System.Web.UI.WebControls.TableRow' cannot be indexed because it has no default property.

View 1 Replies

ADO.NET :: Class 'system.data.datatable' Cannot Be Indexed Because It Has No Default Property

Dec 17, 2010

I'm trying to get a custommembership to work and i have the following problem.

i get a error class 'system.data.datatable' cannot be indexed because it has no default propert.

Here's my function.

Public Overrides Function GetUserNameByEmail(ByVal userEmail As String) _
As String
Dim userName As String = ""
Try
Dim mymember As New Data.DataTable

[code].....

View 4 Replies

DataSource Controls :: An Autonumbered Indexed Column Value Is Of A Newly Inserted Row?

Jan 3, 2010

I am using an auto-numbering index column as the primary key for many of my tables. Is there any way for me to know what the new row count is for newly inserted rows?

View 2 Replies

Web Forms :: Radio Button Selected Indexed Changed Event Not Firing?

Oct 7, 2010

I have two pages ,On click on one button I have to redirect the screen to another page.and after clicking on redirect button page will get redirected to old page.

Problem: while coming to old page i have to set one radio button selected amnog two.I have acheived it through session.But the problem,is after coming back once i selected the radio button which is not selected. its not firing the selected index changed event.

View 2 Replies

ADO.NET :: Class 'System.Data.SqlClient.SqlDataAdapter' Cannot Be Indexed Because It Has No Default Property?

Feb 22, 2011

First time using a dataset instead of a data reader, and I'm trying to fill both a datalist on my page, and set the selected item value for a drop down list. The datalist on the page is displaying properly, but I get this errorClass 'System.Data.SqlClient.SqlDataAdapter' cannot be indexed because it has no default property. when trying to set the selected value for the drop down list. Why can't I get the selected value for the drop down list to work properly?

[Code]....

View 3 Replies

Web Forms :: Response.Redirect ("http://www.") - Internet Security Doesn't Permit To Install "Test.exe"

Nov 5, 2010

I put this code in my aspx file :

[Code]....

when I access my aspx file through Internet I can download the file "Test.exe" but my internet security doesn't permit to install it. Has anyone had this problem?

View 2 Replies

User Controls :: Redirect User To HTTPS (Secured) Connection If HTTP (Unsecure) Connection Is Detected

Mar 12, 2013

I have got ssl security for my website.I have written onLoad that [URL] ... Should redirect on [URL] ... it redirects but first the [URL] ....pages loads full and then after a sec it redirects...I want to solve this

function(){
windows.onload = windows.location.href("https://mylifeshades.com")
}

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved