Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Using unkown folders to pull from a db using 404
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 12 September 2003 :  15:25:22  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I have created a sub directory http://webpage.team-offroad.com/ for a site and set a 404 page called page.asp into the directory it points to. So when someone goes to http://webpage.team-offroad.com/redbrad0 i can grab the username in page.asp that they are looking for and then send them to http://webpage.team-offroad.com/pages.asp?u=1

This all works but I was wondering if there is a better way because if search engines try to index it, will they see it goes to a 404 page and stop indexing?

Also a real wierd problem has come up. Any image i try to display is not visible. The html tag looks like...

<!-- src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="46-->

But an image that gets pulled from the database comes up looking good. Any ideas why?

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 12 September 2003 :  16:33:47  Show Profile
that's not an image tag

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 12 September 2003 :  23:46:31  Show Profile  Visit dayve's Homepage
quote:
Originally posted by Nikkol

that's not an image tag



I thought I had missed something but you noticed the same thing I did...

is there a reason your image tag looks like this:

<!-- src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="46-->

instead of this:

<img src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="46">

Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 13 September 2003 :  02:16:21  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Thats my question, here is the EXACT code from the page.I made in bold red the images tags. somehow the code is being switched.


<%
strPageCategory = "home"
strExtraImageUrl = "http://www.team-offroad.com"
strExtraHomeURL = "http://www.team-offroad.com"
%>
<!--#INCLUDE FILE="../forum/config.asp"-->
<%
strQueryUserID = Request.QueryString("u")
strQueryUserPage = Request.QueryString("p")

If trim(strQueryUserID)="" or isnull(strQueryUserID) or not isnumeric(strQueryUserID) Then
	strQueryUserID=""
End If
If trim(strQueryUserPage)="" or isnull(strQueryUserPage) or not isnumeric(strQueryUserPage) Then
	strQueryUserPage=""
End If

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString


If strQueryUserID="" Then
	' # LETS GET THE USERNAME THEY ARE LOOKING AT
	strBadLink = Request.QueryString
	strBadLink = Replace(strBadLink, "404;", "")
	strUserName = right(strBadLink, (len(strBadLink)-32))

	' # LETS GET THAT USERS ID #
	strSql = "SELECT MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME = '" & strUserName & "'"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open strSql, my_Conn
	if rs.eof or rs.bof then
		Response.Write "Username not found"
		Response.End
	else
		strMemberID = rs("MEMBER_ID")
	end if

	Response.Redirect("pages.asp?u=" & strMemberID)
Else
	' # LETS MAKE SURE ITS A VALID USERID
	strSql = "SELECT MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & strQueryUserID
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open strSql, my_Conn
	if rs.eof or rs.bof then
		Response.Write "not a valid userid"
		Response.End
	else
		strMemberID = rs("MEMBER_ID")
	end if
End If

' # LETS FIND OUT WHAT PAGE THEY WANT TO DISPLAY
If strQueryUserPage="" Then
	' # LETS DISPLAY THERE MAIN PAGE
	strSql = "SELECT WEBSITE_ID"
	strSql = strSql & ", WEBSITE_MEMBERID"
	strSql = strSql & ", WEBSITE_PAGETITLE"
	strSql = strSql & ", WEBSITE_BODY"
	strSql = strSql & ", WEBSITE_BGCOLOR"
	strSql = strSql & ", WEBSITE_MENUCOLOR"
	strSql = strSql & ", WEBSITE_BGIMAGE"
	strSql = strSql & ", WEBSITE_BASECOLOR"
	strSql = strSql & ", WEBSITE_BASECOLORLINK"
	strSql = strSql & ", WEBSITE_BASECOLORALINK"
	strSql = strSql & ", WEBSITE_BASECOLORVLINK"
	strSql = strSql & ", WEBSITE_MAINPAGE"
	strSql = strSql & " FROM " & strTablePrefix & "WEBSITE"
	strSql = strSql & " WHERE WEBSITE_MEMBERID = " & strMemberID
	'strSql = strSql & " AND WEBSITE_MAINPAGE = 1"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.open strSql, my_Conn
	if rs.eof or rs.bof then
		Response.Write "no home page found"
	else
		strWebPageID = rs("WEBSITE_ID")
		strWebPageMemberID = rs("WEBSITE_MEMBERID")
		strWebPagePageTitle = rs("WEBSITE_PAGETITLE")
		strWebPageBody = rs("WEBSITE_BODY")
		strWebPageMenuColor = rs("WEBSITE_MENUCOLOR")
		strWebPageBGColor = rs("WEBSITE_BGCOLOR")
		strWebPageBGImage = rs("WEBSITE_BGIMAGE")
		strWebPageBaseColor = rs("WEBSITE_BASECOLOR")
		strWebPageBaseColorLink = rs("WEBSITE_BASECOLORLINK")
		strWebPageBaseColorALink = rs("WEBSITE_BASECOLORALINK")
		strWebPageBaseColorVLink = rs("WEBSITE_BASECOLORVLINK")
		strWebPageMainPage = rs("WEBSITE_MAINPAGE")
	end if
End If

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title><%=strWebPagePageTitle%></title>
</head>

<body leftMargin="0" rightmargin="0" topMargin="0" marginwidth="0" marginheight="0" background="<%=strWebPageBGImage%>" bgcolor="<%=strWebPageBGColor%>" text="<%=strWebPageBaseColor%>" link="<%=strWebPageBaseColorLink%>" vlink="<%=strWebPageBaseColorVLink%>" alink="<%=strWebPageBaseColorALink%>">
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td width="100%" colspan="2" bgcolor="#000000" valign="top" align="center"><a href="<%=strHomeURL%>"><img src="<%=strImageUrl%>banner.gif" border="0" height="60" width="468"></a></td>
    </tr>
    <tr>
      <td width="150" bgcolor="#000000" rowspan="4" valign="top" align="left"> </td>
      <td width="99%"><a href="<%=strHomeURL%>"><img src="<%=strImageUrl%>banner.gif" border="0" height="60" width="468"></td>
    </tr>
    <tr>
      <td width="99%">
        <div align="center">
          <table border="0" cellpadding="0" cellspacing="0" width="95%">
            <tr>
              <td width="100%" valign="top" align="left"><%=strWebPageBody%></td>
            </tr>
          </table>
        </div>
      </td>
    </tr>
    <tr>
      <td width="99%"><img src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="46"></td>
    </tr>
    <tr>
      <td width="99%" valign="top" align="center">TEAM-OFFROAD.COM</td>
    </tr>
  </table>
  </center>
</div>
</body>

</html>
<%
Response.End
%>

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 13 September 2003 :  08:26:29  Show Profile
When I go to http://webpage.team-offroad.com/redbrad0 here is the HTML I get:


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My WebsiteS</title>
</head>

<body leftMargin="0" rightmargin="0" topMargin="0" marginwidth="0" marginheight="0" background="" bgcolor="d6c49e" text="midnightblue" link="darkblue" vlink="blue" alink="red">
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td width="100%" colspan="2" bgcolor="#000000" valign="top" align="center"><a href="http://www.team-offroad.com/"><img src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="468"></a></td>
    </tr>
    <tr>
      <td width="150" bgcolor="#000000" rowspan="4" valign="top" align="left"> </td>
      <td width="99%"><a href="http://www.team-offroad.com/"><img src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="468"></td>
    </tr>
    <tr>
      <td width="99%">
        <div align="center">
          <table border="0" cellpadding="0" cellspacing="0" width="95%">
            <tr>
              <td width="100%" valign="top" align="left">This is the body of my site DMCLKFDJSLKFJDLKJFSDLK <IMG style="WIDTH: 0px; HEIGHT: 0px" alt="Home Page" hspace=0 src="http://www.team-offroad.com/images/nav_home.gif" align=baseline border=0><IMG style="WIDTH: 41px; HEIGHT: 19px" alt="" hspace=0 src="http://www.team-offroad.com/images/nav_home.gif" align=baseline border=0></td>
            </tr>
          </table>
        </div>
      </td>
    </tr>
    <tr>
      <td width="99%"><img src="http://www.team-offroad.com/images/banner.gif" border="0" height="60" width="46"></td>
    </tr>
    <tr>
      <td width="99%" valign="top" align="center">TEAM-OFFROAD.COM</td>
    </tr>
  </table>
  </center>
</div>
</body>

</html>
The image tags look fine to me.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 13 September 2003 :  11:42:31  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Wierd, now it works and it didnt work before.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 September 2003 :  12:04:28  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by redbrad0

Wierd, now it works and it didnt work before.


Gremlins
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 13 September 2003 :  13:25:02  Show Profile  Visit dayve's Homepage
quote:
Originally posted by redbrad0

Wierd, now it works and it didnt work before.



perhaps you had some caching issues going on earlier.

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 14 September 2003 :  02:00:15  Show Profile  Visit Gremlin's Homepage
quote:
Originally posted by HuwR

quote:
Originally posted by redbrad0

Wierd, now it works and it didnt work before.


Gremlins


*looks around* .. wasn't me .. Honest !! :)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07