Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2010
    Posts
    3

    Unanswered: how to make dynamic url's without mod-rewrite?

    I have a website where the articles uploaded are all done dynamically and I would like to have them changed into static urls. for example Live NFL football odds, lines, point spreads, sports betting odds, gambling lines oddsshark should be a / but with .asp there is no mod-rewrite. Any ideas?
    Last edited by gvee; 08-26-10 at 12:23.

  2. #2
    Join Date
    Aug 2010
    Posts
    3
    apparently its not showing the url so Value Bet here is a visible example of the ? in an article.

    thanks for the help
    Last edited by gvee; 09-02-10 at 12:25.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    The options available are entirely up to your hosting provider, unless you want to switch to a managed environment like ASP.NET...

    When you say mod rewrite is not available, does that mean ISAPI modules in general are a no-no?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Sep 2006
    Posts
    265
    I would suggest you look at one of these methods.

    As you are using a scripting language Asp / Asp.Net you can:

    1) Use a database and File System Object

    Dynamic Includes can't be used as these are processed before the QueryString! Bother!

    Within the database there is variable for the dynamic file reference and with FSO you suck this onto your page. Each record would have it own unique file reference or simply use the Querystring

    page=nba/teams/teams.aspx

    Code:
        IncFileName = Request.QueryString("page")
        incFile = Server.MapPath(IncFileName)
    	fs = Server.CreateObject("Scripting.FileSystemObject")
    	tmpFile = fs.OpenTextFile(incFile, 1, False)
    	tmpStr=tmpFile.readall
    	response.write(tmpStr)
    	tmpfile.close
    	tmpfile=nothing
    	fs=nothing
    Simon

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    How would you do that in classic asp without relying on an ISAPI module to get between the request and the scripting engine? Parsing the querystring is no big deal, but how would you get to a single place where it could be done in classic?

    I can think of a handful of ways to do this in .NET if I didn't have any help from IIS, but I'm at a loss for advice to provide for Classic. I'm always game for stealing other people's tricks though, if you have one...


    charto... do you have .NET available? It would make your life easier if you could do it in straight up .NET. If you already have a significant investment in classic asp, you might still have an option to let .NET take care of the routing for you by making all your links end in .aspx (which passes execution to the .NET runtime) and then instructing .NET to serve the Classic ASP page, though it would take a bit of trickery to serve a fully parsed classic asp page without doing a redirect since you can't just pull it off disc and stuff it in the response.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Sep 2006
    Posts
    265
    This will work in both asp and Asp.NET. All you do is put the variable information in one file and the left the rest in the parent asp form. This code started in classic and this is the asp code:

    Code:
            incFileName = Request.QueryString("page")
            incFile = Server.MapPath(IncFileName)
            set fs = Server.CreateObject("Scripting.FileSystemObject")
    	Set tmpFile = fs.OpenTextFile(incFile, 1, False)
    	tmpStr=tmpFile.readall
    	response.write tmpStr
    	tmpfile.close
    	set tmpfile=nothing
    	set fs=nothing
    Basically create the top of each web page down to the navigation and then the side bar (Float Left) and then the dynamic content again with (Float Left)

    Then create the dynamic content in a separate file no Header just starting

    Code:
    <h1 class="genericH1Tags" style="margin-bottom:10px;">NFL ODDS</h1>
    <span style="font-size:10pt;">(8/26/2010 to 9/2/2010)</span>
    
    Then the rest of the content down to the footerlinks.
    Simon

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Right, but how do you field a call to http://mysite.com/some/random/unknown/dynamic/url.asp without having a physical path to that asp file? Who executes the parsing logic? If you can actually load up the scripting engine somehow, then it's trivial to break apart the url and do with it what you will. But without an ISAPI filter or the .NET runtime (http handler/mvc), how do you listen for that url in the first place? In other words, where would the "parent" form live and how does it get called?

    Am I misunderstanding the question and the OP actually wants http://mysite.com/url.asp?some/dynamic/code/goes/here?
    Last edited by Teddy; 08-26-10 at 12:08.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    I Use a 404 error and load read the qureystring have pointed the 404 error to an other asp page them I do the transfer() and this does not change the address bar
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Ahhhh, sneaky!
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  10. #10
    Join Date
    Aug 2010
    Posts
    3

    Scores and Updated Schedules for all Major Sports Teams

    Update we have now converted the site succesfully to php and wanted to know if the site is properly coded do you mind giving me your feedback the site can be found here there are a few things I am having trouble converting over such as the blogs and a few other various pages that need to have the ability to upload videos aside from that its good to go I believe.

  11. #11
    Join Date
    Sep 2011
    Location
    sweden
    Posts
    5
    Working but what is this site about its not professional design for the site i think so

Tags for this Thread

Posting Permissions

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