product URL

  • Posts: 200
  • Thank you received: 13
2 years 2 months ago #347198

-- HikaShop version -- : 4.7
-- Joomla version -- : 4.5.2
-- PHP version -- : 8.1

hi

when i create a product hikashop automaticlly adds a "p" character to URL before alias.

for example if my alias is "123XYZ" the product url is domain.com/p123XYZ

how can i remove that "p" ??

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 2 months ago #347201

Hi,

Aliases can't start with a number.
That's to avoid the confusion between 123XYZ and 456-123XYZ which would be used when the "remove product and category ids in URLs" setting would be turned off.
If HikaShop didn't add the "p" automatically, it would display you the product with the id "123" instead of the product with the alias "123XYZ" when using the URL.
So if you don't want the "p" to be added, just make sure it doesn't starts with a number.

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 13
2 years 2 months ago #347216

you know, i migrate my old website from K2 to a new website built with the great HikaShop.
in that old site, all my urls used to start with product ID

for example my product page url was : domain.com/products/123-myproduct
now this product url in new website has become domain.com/products/p123-myproduct

eventually, all my indexed pages in google are now 404.

whats should i do ? id there any redirect that i can put that extra "p" to urls ?

Please Log in or Create an account to join the conversation.

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 2 months ago #347218

Hi,

This means you must have activated the "remove product and category ids from URLs" setting of the HikaShop configuration since then.
So check that setting and turn it off. That way, you'll get back URLs with 123-myproduct without "p" added.

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 13
2 years 2 months ago #347228

i can not do this because IDs are between old and new sites are not the same.

i think my only solution is to redirect domain.com/products/123-myproduct to domain.com/products/p123-myproduct

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum