Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Redirect urls from cookieless session to normal url

Redirect urls from cookieless session to normal url

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlexeiXX3
    wrote on last edited by
    #1

    Hi guys, thanks for looking Im having a little problem with search engines When i launched my site i was using cookiless session, well, actually it was autodetect Search engines crawled my site, and asp.net detected them like cookieless browsers, and some links have the session id in the url Ive set the sessionState cookieless="false" now But still there are some links with the session id What i want to do is to detect when a url has a session id and redirect them to the default page, or even better to the requested page but removing the sessionid Ive tryed this in the global.asax:

    Protected Sub Application\_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
        If Request.Url.ToString.Contains("(S(") Then '"(S(" just for the time being :)
            Response.Redirect("~/")
        End If
    End Sub
    

    But the url always contains a regular url (without the session id, and im using a url with session id in it) What would be the best way to accompilsh my goal?? Thanks in advance

    Alexei Rodriguez

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups