SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot thomasr's Avatar
    Join Date
    Apr 2009
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wanting to rewrite database driven URLs...it is much work?

    I am helping to optimize a website for a friend. It is built in asp which I know nothing about. I want the urls to be changed to something more SEO friendly. So I have 2 questions

    1) the programmer is telling me that the url below is database driven and cannot be changed. or its too much work and better to create a whole new page. I simply want to change

    http://www.valuecruises.net/destination_introduction.aspx?dest=39
    to new url
    http://www.valuecruises.net/asia/china/

    is it really that tough for a database driven url?

    2) I want pages ending in ugly .aspx to end with a forward slash (/) how hard it that? for example

    http://www.valuecruises.net/cruises_introduction.aspx
    to
    http://www.valuecruises.net/cruise-introduction/

    are they being lazy or are these changes alot of work?

  2. #2
    SitePoint Member tkowebworks's Avatar
    Join Date
    Oct 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having this same sort of issue and I'm not sure what to do.
    I hope you find the answer

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    .aspx means ASP.NET. This is the Classic ASP forum.

    What you need is URLRewrite - I don't know if this is supported in .NET.

    Edit:

    Thread moved to .NET - Mittineague
    Last edited by Mittineague; Jun 15, 2011 at 14:19.
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru View Post
    ... What you need is URLRewrite - ...
    What year is this? How about System.Web.Routing instead? Works nicer in MVC but you can use it without.

  5. #5
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I know the sum total of zilch about .NET, but at least my reply would give them something to search against - so not entirely useless. :P

    (Your reply was obviously more targeted. )
    Ian Anderson
    www.siteguru.co.uk

  6. #6
    SitePoint Member tkowebworks's Avatar
    Join Date
    Oct 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I saw something on the Microsoft site that says: URL Rewriting in ASP.NET
    "URL rewriting can be implemented either with ISAPI filters at the IIS Web server level, or with either HTTP modules or HTTP handlers at the ASP.NET
    level. There are, however, numerous third-party ISAPI filters"
    I don't know enough about databases so I cant find what is best.

    Is the System.Web.Routing a better option?

  7. #7
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru View Post
    I know the sum total of zilch about .NET, but at least my reply would give them something to search against - so not entirely useless. :P

    (Your reply was obviously more targeted. )
    Cheers.
    Quote Originally Posted by tkowebworks View Post
    ... Is the System.Web.Routing a better option?
    I like it. YMMV.

  8. #8
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    If you're going to use MVC your life will be easier. Any of the MVC tutorials will get you moving with Routing. Using ASP.NET it gets a tiny bit more complicated and I had some issues using routing and membership provider in IIS 7+. I was learning MVC anyway so I never did bother to fix the issues.

  9. #9
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Routing, not rewriting is definitely the way to go here.

    We usually build objects with two unique keys. First is the good old fasioned immutable primary key -- typically an integer or a guid depending on requirements. Second ID is a mutable, human editable one for the URL slug. Load things on the public facing side by url slug, problem solved.

  10. #10
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    Routing, not rewriting is definitely the way to go here.
    Most assuredly.

    Quote Originally Posted by wwb_99 View Post
    We usually build objects with two unique keys. First is the good old fasioned immutable primary key -- typically an integer or a guid depending on requirements. Second ID is a mutable, human editable one for the URL slug. Load things on the public facing side by url slug, problem solved.
    I've considered using a slug but I keep things extremely simple. Instead of using a slug, I use the page title with punctuation removed and spaces changed to dashes. Upon submission of a new page or article I validate against existing titles to ensure it doesn't already exist.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •