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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Big Increase in Mobile 404s on topic.asp
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bobby131313
Senior Member

USA
1163 Posts

Posted - 23 June 2015 :  14:01:06  Show Profile  Visit bobby131313's Homepage  Reply with Quote
I have a separate Statcounter project set up on my 404 page to monitor bad links.

I've noticed a large increase in 404s from mobile users on completely legit urls.

When I click the links on Statcounter however the urls come up partially encoded like so....

http://www.coincommunity.com/forum/topic.asp%3FTOPIC_ID%3D20132

and they do indeed throw a 404.

Has anyone run into this?

Switch the order of your title tags

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 June 2015 :  14:16:55  Show Profile  Visit HuwR's Homepage
are they coming from a common referrer? maybe somewhere has links to your site which are wrongly encoded

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 23 June 2015 :  14:27:28  Show Profile  Visit bobby131313's Homepage
Unfortunately most show no referrer which I think is a mobile thing.

However some are from my own site and the links are fine, they just come up with this 404 on some mobile visits.

Google has also notified me that their mobile bot is encountering these a lot too.

It's very weird.

Switch the order of your title tags
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 23 June 2015 :  16:51:11  Show Profile
At the top of your "topic.asp", just after the includes, insert this:


If InStr(Request.ServerVariables("URL"),"%3F") > 0 Then
	strURL=Replace(Request.ServerVariables("URL"),"%3F", "?")
	strURL=Replace(strURL, "%3D", "=")
	Response.Redirect strURL
End If


Now, make a custom 404 page for your forum (make sure you tell IIS to use it instead of the default):

It can be something like this - but make sure it includes the parts in RED. The "notopic.asp" page should NOT exist. Now, if a link to a topic is improperly coded and they click the link in the 404 page, it will take them where they should be.


<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-15 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain
'## intact in the scripts and in the HTML output.  The "powered by"
'## text/logo with a link back to http://forum.snitz.com in the
'## footer of the pages MUST remain visible when the pages are
'## viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to Free Software Foundation, Inc.
'## 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="includes/inc_sha256.asp"-->
<!--#INCLUDE FILE="includes/inc_header.asp" -->
<%
strURL = ""
For I = 1 to Len(Request.ServerVariables("HTTP_Referer"))
	If Mid(Request.ServerVariables("HTTP_Referer"),i, 3) = "%3F" Then
		strURL=Replace(Request.ServerVariables("HTTP_Referer"),"%3F", "?")
		strURL=Replace(strURL, "%3D", "=")
		Exit For
	End If
Next
If strURL > "" Then Response.Redirect strURL
Response.Write	"<table align=""center"" width=""80%"" border=""0"">" & vbNewLine & _
	"	<tr valign=""Middle"">" & vbNewLine & _
	"		<td align=""left"">" & vbNewLine & _
	"			<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiliteFontColor & """><p align=""justify"">Page not found.  Please check the URL in your browser.  If you are trying to reach a forum topic, the URL should be displayed in this fashion:  "" & strForumURL & "topic.asp?TOPIC_ID=1".  Some browsers improperly encode the URL to change question marks (?) into %3F and equal signs (=) into %3D.  If this is the case, try this link to reach the correct page:<a href=""" & strForumURL & " & notopic.asp"">Re-try</a>.<br /><br />If the URL is correct in the browser, please notify the system administrator.  If this forum has the <a href=""bug_reporter.asp"">bug reporter</a> installed, please use it to report the problem.</p>" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table>" & vbNewLine
WriteFooter
%>

Edited by - Carefree on 23 June 2015 16:52:43
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 23 June 2015 :  18:16:54  Show Profile  Visit bobby131313's Homepage
Thanks Carefree, I will give it a try.

Switch the order of your title tags
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 24 June 2015 :  12:20:43  Show Profile  Visit bobby131313's Homepage
Didn't work out of the box, but my 404 page is already very heavily customized. It put me on track enough that I got it fixed though. Thanks!

Switch the order of your title tags
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 June 2015 :  13:08:56  Show Profile
You're welcome.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07