How to remove default.asp pages after applying the latest SEO module (26/10/2012)

How to remove default.asp pages after applying the latest SEO module (26/10/2012)

After installing the SEO module update (released 26th October 2012), you need to apply the below fixes to remove your default.asp pages.

1a. Open file 'shopdisplayproducts.asp' using notepad or text editor.

1b. Locate the below lines: (Should be around line 13)

<%
'*********************************************************************************
' 7.00
' 1 Dec 2009
' Main program logic for displaying products.
'*********************************************************************************

1c. Beneath the above lines, please insert:

'702 - 2012.11.01 - Enhancement: SEO - To remove default.asp from SEO link
if ucase(getconfig("xSEODynamicEnable"))="YES" and ucase(getconfig("xSEODynamicProductsEnable")) = "YES" and instr(lcase(request.servervariables("HTTP_X_REWRITE_URL")),"default.asp") > 0 then
dim replacescriptname
replacescriptname = lcase(request.servervariables("HTTP_X_REWRITE_URL"))

'702 - 2013.03.01 - Bug Fix: Remove default.asp is not working with subfolder shopping cart
dim replacexmysite
replacexmysite = request.ServerVariables("HTTP_HOST")
replacescriptname = "http://" & replacexmysite & replace(replacescriptname,"default.asp","")

if len(request.ServerVariables("QUERY_STRING")) > 0 Then
replacescriptname = replacescriptname & "?" & request.ServerVariables("QUERY_STRING")
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", replacescriptname
Response.Flush
Response.End
end if

2a. Open file 'shopdisplaycategories.asp'.

2b. Locate the below lines: (Should be around line 7)

<%
'*********************************************************************************
' 7.00
' 1 Dec 2009
' Display shop categories
' displays a list of categories from Shopping Database
'*********************************************************************************

2c. Beneath the above lines, please insert:

'702 - 2012.11.01 - Enhancement: SEO - To remove default.asp from SEO link
if ucase(getconfig("xSEODynamicEnable"))="YES" and ucase(getconfig("xSEODynamicProductsEnable")) = "YES" and instr(lcase(request.servervariables("HTTP_X_REWRITE_URL")),"default.asp") > 0 then
dim replacescriptname
replacescriptname = lcase(request.servervariables("HTTP_X_REWRITE_URL"))

'702 - 2013.03.01 - Bug Fix: Remove default.asp is not working with subfolder shopping cart
dim replacexmysite
replacexmysite = request.ServerVariables("HTTP_HOST")
replacescriptname = "http://" & replacexmysite & replace(replacescriptname,"default.asp","")

if len(request.ServerVariables("QUERY_STRING")) > 0 Then
replacescriptname = replacescriptname & "?" & request.ServerVariables("QUERY_STRING")
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", replacescriptname
Response.Flush
Response.End
end if

3a. Open file 'shopexd.asp'.

3b. Locate the below lines: (Should be around line 10)

<%
'*********************************************************************************
' 7.00
' 1 Dec 2009
' Automatic Extended Description
' shopexd.asp?id=xx
' xx = CatalogId
' The Template to be used is is xproductTemplate of a specific Template for
' the product in the Database
'*********************************************************************************

3c. Below the above lines, please insert:

'702 - 2012.11.01 - Enhancement: SEO - To remove default.asp from SEO link
if ucase(getconfig("xSEODynamicEnable"))="YES" and ucase(getconfig("xSEODynamicProductsEnable")) = "YES" and instr(lcase(request.servervariables("HTTP_X_REWRITE_URL")),"default.asp") > 0 then
dim replacescriptname
replacescriptname = lcase(request.servervariables("HTTP_X_REWRITE_URL"))

'702 - 2013.03.01 - Bug Fix: Remove default.asp is not working with subfolder shopping cart
dim replacexmysite
replacexmysite = request.ServerVariables("HTTP_HOST")
replacescriptname = "http://" & replacexmysite & replace(replacescriptname,"default.asp","")

if len(request.ServerVariables("QUERY_STRING")) > 0 Then
replacescriptname = replacescriptname & "?" & request.ServerVariables("QUERY_STRING")
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", replacescriptname
Response.Flush
Response.End
end if

4a. Open file 'shop$db.asp'.

4b. Locate the below lines: (Roughly line 2961, within routine sub PageNavBar(sql))

scriptname=request.servervariables("script_name")

4c. Below the above lines, please insert:

'702 - 2012.11.01 - Enhancement: SEO - To remove default.asp from SEO link
scriptname = replace(lcase(scriptname),"default.asp","")

5a. Open file 'shop$db.asp'.

5b. Locate the below lines: (Should be around line 3065, within routine sub PageNavBarfornext(sql))

scriptname=request.servervariables("script_name")

5c. Below the above lines, please insert:

'702 - 2012.11.01 - Enhancement: SEO - To remove default.asp from SEO link
scriptname = replace(lcase(scriptname),"default.asp","")

6a. Open file 'shop$db.asp'.

6b. Locate the below lines: (Roughly line 3169, within routine sub PageNavBarNext(sql))

scriptname=request.servervariables("script_name")

6c. Below the above lines, please insert:

'702 - 2012.11.01 - Enhancement: SEO - To remove default.asp from SEO link
scriptname = replace(lcase(scriptname),"default.asp","")

7. Save these files and upload to your site.


Times Viewed:
7862
Added By:
Bobby
Date Created:
11/1/2012
Last Updated:
3/6/2013