If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to make dynamic url's without mod-rewrite?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-23-10, 20:51
charto911 charto911 is offline
Registered User
 
Join Date: Aug 2010
Posts: 3
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 11:23.
Reply With Quote
  #2 (permalink)  
Old 08-23-10, 20:52
charto911 charto911 is offline
Registered User
 
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 11:25.
Reply With Quote
  #3 (permalink)  
Old 08-24-10, 11:21
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,071
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? ***
Reply With Quote
  #4 (permalink)  
Old 08-25-10, 17:30
SimonMT SimonMT is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 08-26-10, 01:12
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,071
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? ***
Reply With Quote
  #6 (permalink)  
Old 08-26-10, 04:33
SimonMT SimonMT is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 08-26-10, 11:02
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,071
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?
__________________
oh yeah... documentation... I have heard of that.

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

Last edited by Teddy; 08-26-10 at 11:08.
Reply With Quote
  #8 (permalink)  
Old 08-30-10, 06:05
myle myle is online now
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,143
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
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
Reply With Quote
  #9 (permalink)  
Old 09-01-10, 17:53
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,071
Ahhhh, sneaky!
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #10 (permalink)  
Old 09-27-11, 02:20
charto911 charto911 is offline
Registered User
 
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.
Reply With Quote
  #11 (permalink)  
Old 10-27-11, 04:08
servermonitoring servermonitoring is offline
Registered User
 
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
Reply With Quote
Reply

Tags
mod-rewrite

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On