Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 ASP (Windows server) versions
 Canonical urls for ASP
Author « Topic »  

joetuesday
Advanced Member

183 Posts

Pre-sales questions only
(More Details...)

Posted - 01/02/2024 :  15:59:19  
Hello,


I read through the furoms and did see a php cript for dynmically creating canonical urls per page. Is there an accepted way to do this for ASP that doesnt open itself up to sql injections? Thanks.



Joe

dbdave
ECT Moderator

USA
10408 Posts

Posted - 01/02/2024 :  18:35:28  
Hi Joe, it may be helpful if we understood your concern better.

If you just need to specify https or www vs non www, then there are examples here on the forum and here is a post with one https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=112596

It sounds like perhaps you are more concerned with the overall URL's though.
I would suggest you check this page ( https://www.ecommercetemplates.com/help/search-engine-friendly.asp ) and decide what type url's you want to show on your site as there are quite a few options.
Personally, I don't use the URL rewrite stuff, but many folks do. (SE's fully understand and index querystrings )
I do use the category names in place of the ID's though.
In any case, while it is possible to use more than one form of a URL to get to the same page (www.yoursite.com/categories.asp?cat=12 vs www.yoursite.com/categories.asp?cat=Blue+widgets), if you set this up early, then it's unlikely these multiple URL's will ever be used or discovered and (my opinion) there would be no need to tell the SE's anything about what URL is the one you want to use.

If my response doesn't cover it, let me know more about your issue and I'll see if I can think of a way to solve it.

Thanks,
David

joetuesday
Advanced Member

183 Posts

Pre-sales questions only
(More Details...)

Posted - 01/03/2024 :  14:55:38  
Hello Sir,

After the Head tag in the respective page, i would like to issue a rel=canonical tag with the respective pages url to establish that it is the canonical page per here: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls and would like to do so for every page dynamically. There is a php version listed here:

https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=104554

Thanks.



Joe

dbdave
ECT Moderator

USA
10408 Posts

Posted - 01/03/2024 :  16:12:32  
Hi, if you are not using any of the rewrite stuff, then it should be as easy as ---

Add <!--#include file="vsadmin/inc/metainfo.asp"--> (if it's not already there) to your proddetail.asp page in the head, before the line below.
This makes several variables available as described here https://www.ecommercetemplates.com/seo/dynamic-title-meta-asp.asp

From there, it's just a matter of using the following line

<link rel="canonical" href="https://www.yoursite.com/proddetail.asp?prod=<%=strip_tags(productid)%>" />

Of course be sure to enter your site there.
If you need this for the category and products pages, let me know.
Thanks,
David

Edited by - dbdave on 01/03/2024 18:04:15

joetuesday
Advanced Member

183 Posts

Pre-sales questions only
(More Details...)

Posted - 01/04/2024 :  14:15:39  
Dave - Thank you for your feedback and help to point me in the correct direction.



Joe

dbdave
ECT Moderator

USA
10408 Posts

Posted - 01/04/2024 :  14:33:49  
No problem Joe.
Please post back if that's not what you wanted or you need more help.
Thanks,
David

cararaca
Starting Member

Australia
19 Posts

Pre-sales questions only
(More Details...)

Posted - 01/28/2024 :  22:51:45  
Hi David, yes please also provide for category and product pages.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000