Author |
Topic |
|
vaheh
VP-CART New User
USA
115 Posts |
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - July 22 2014 : 22:19:33
|
i dont think your wanted link will work. from my thinking, vpasp cart system seo creating folder per folder of each category and each product inside products folder. with such struture any change to the link of course you are not matching the existing folder to load. i have no idea what other solution to make. but maybe url rewrite software ?? but i dont know much about how url rewrite will work on your demand. diego. |
|
|
vaheh
VP-CART New User
USA
115 Posts |
Posted - July 23 2014 : 14:51:48
|
Hi Diego,
Thank you for your reply. You are right since it is creating a folder with the same name this will not work. Do you know how we can change this SEO so it will be based on general WEB.CONFIG or HTACCESS rule? In that case we don''t have to click on Generate SEO like most of other shopping cart systems. I hope in version 8 it works dynamically.
Thanks, |
|
|
manilow
VP-CART New User
France
134 Posts |
Posted - July 24 2014 : 03:41:42
|
Hi Vaheh,
I think the best way would be to use the URL rewrite rules in IIS on your server.
I developped my own SEO friendly URL''s using a field in the product record. In this way, the URL will not change when moving from category or changing the product name. I can generate the product URL by a script or write it manually. A product URL starts with ''p'' followed by the product id, something like : p123-my-product-description.htm.
The URL rewrite code in IIS is :
^.*p([0-9]+).+\.htm.*$
The rewritten URL is :
/shopexd.asp?ID={R:1}&requestedURL={R:0}
The query variable ''requestedURL'' is the exact URL the visitor asked for. Whenever different from the product field seoURL an error will be displayed. Obsolete pages will not be redirected to new pages in order to delete them from search engine indexes.
Kind regards,
Erik www.aquathermia.com |
|
|
vaheh
VP-CART New User
USA
115 Posts |
Posted - July 24 2014 : 13:35:05
|
Hi Erik,
Thank you so much for this wonderful shortcut. Did you make any changes inside shopdisplayproducts.asp or shopdisplaycategories.asp or shopexd.asp?
Once again thank you for your help. Vaheh |
|
|
manilow
VP-CART New User
France
134 Posts |
Posted - August 02 2014 : 17:46:06
|
Hi Vaheh,
I indeed made some changes to the product pages. Below an example for the shopexd.asp page:
requestedURL = request.QueryString("requestedURL") ''requestedURL is written by ISAPI rewrite rule if left(requestedURL,1)="/" then requestedURL = right(requestedURL,len(requestedURL)-1) SetSess "backpage", requestedURL ''save current url for return button in shoperror
''700 - 2010.07.08 - Enhancement: Always redirect to SEO link if SEO Dynamic enabled if ucase(getconfig("xSEODynamicEnable"))="YES" and ucase(getconfig("xSEODynamicProductsEnable")) = "YES" and instr(lcase(request.servervariables("SCRIPT_NAME")),"shopexd.asp") > 0 then dim friendlyURL genseoproductlink friendlyURL,cint(CatalogId),"","No" if friendlyURL <> "" then if requestedURL <> replace(friendlyURL,"+"," ") then ''replace + by spacing : ISAPI url can''t transmit +''s ''301 redirection code ''Response.Status="301 Moved Permanently" ''Response.AddHeader "Location", xmysite & "/"& friendlyURL redirecttoseoinvalidpage ''shopclosedatabase dbc ''response.end end if end if end if
Lines in pink are outquoted (obsolete), green lines have been added. I used the redirecttoseoinvalidpage routine to indicate an old url is gone using Response.Status="410 Gone".
The code in shopdisplaycategories.asp and shopdisplayproducts.asp is quite similar.
I hope this will help you further.
Regards,
Erik www.aquathermia.com
|
|
|
vaheh
VP-CART New User
USA
115 Posts |
Posted - August 05 2014 : 18:59:59
|
Hi Erik,
Thank you so much for your code. I am going to test this on my site this weekend.
Regards, Vaheh |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - August 12 2014 : 08:30:51
|
Hi Erik,
Do we need to do something with server to apply your custom code? or we can just paste the code?
*serj* |
|
|
manilow
VP-CART New User
France
134 Posts |
Posted - August 12 2014 : 11:13:50
|
Hi Serj,
Some modifications on the web server are indeed necessary. You need the URL Rewrite option in IIS.
In this module you need to create 3 different URL rewrite rules:
1. products
Name : Products Model: ^.*p([0-9]+).+\.htm.*$ Rewritten URL: /shopexd.asp?id={R:1}&requestedURL={R:0}
Example: http://www.aquathermia.com/p348-photometre-piscine-palintest-pooltest-3.htm
Returned page: /shopexd.asp?id=348&requestedURL=p348-photometre-piscine-palintest-pooltest-3.htm
2. Categories
Name: Categories c Model: ^.*c([0-9]+).+\.htm.*$ Rewritten URL: /shopdisplayproducts.asp?id={R:1}&requestedURL={R:0}
3. Categories Name: Categories cat Model: ^.*cat([0-9]+).+\.htm.*$ Rewritten URL: shopdisplaycategories.asp?id={R:1}&requestedURL={R:0}
I inserted an extra record in the products and categories tables to store the SEO URL (you could use any other field like pother1). This SEO URL is compared to the requestedURL (this value is included in the querystring). If the SEO URL is not equal to requestedURL, shoperror.asp is displayed.
The advantage of this SEO URL approache is that the URL remains always the same no matter the category the product is in, no matter the changes you could in the productname.
It needs some coding .
Kind regards,
Erik www.aquathermia.com |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - August 28 2014 : 07:32:28
|
you''re so great!
thanks!
*serj* |
|
|
|
Topic |
|