Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Soren
I am having some issue with managing hostname my tree is like:
The issue is when i set the shop hostname to homepage, the homepage is always redirected to shop page , i want shop and home page separate , when
i remove the hostname settings , the product url gives 404 error, I think that is because of url rewriting defined in urlrwriting.config.
<add name="DefaultCategoryProductRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog/product.aspx?catalog=$2&category=$3&product=$4" ignoreCase="true" xmlns="" /> <add name="DefaultProductRewrite" virtualUrl="(.*)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog/product.aspx?catalog=$2&product=$3" ignoreCase="true" xmlns="" /> <add name="DefaultCategoryRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog.aspx?catalog=$2&category=$3" ignoreCase="true" xmlns="" /> <add name="DefaultCatalogRewrite" virtualUrl="(.*)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog.aspx?catalog=$2" ignoreCase="true" xmlns="" />
I think you need to insert shop in the destinationUrl so it reflekt your sitetree, like this
~/shop/catalog/product.aspx?catalog=$2&category=$3&product=$4
Yep that does the trick
Thanks for being awesome and helping out, Kim! #h5yr!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
UrlRewriting Issue in razor store
Hi Soren
I am having some issue with managing hostname my tree is like:
The issue is when i set the shop hostname to homepage, the homepage is always redirected to shop page , i want shop and home page separate , when
i remove the hostname settings , the product url gives 404 error, I think that is because of url rewriting defined in urlrwriting.config.
<add name="DefaultCategoryProductRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog/product.aspx?catalog=$2&category=$3&product=$4" ignoreCase="true" xmlns="" /> <add name="DefaultProductRewrite" virtualUrl="(.*)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog/product.aspx?catalog=$2&product=$3" ignoreCase="true" xmlns="" /> <add name="DefaultCategoryRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog.aspx?catalog=$2&category=$3" ignoreCase="true" xmlns="" /> <add name="DefaultCatalogRewrite" virtualUrl="(.*)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog.aspx?catalog=$2" ignoreCase="true" xmlns="" />
I think you need to insert shop in the destinationUrl so it reflekt your sitetree, like this
~/shop/catalog/product.aspx?catalog=$2&category=$3&product=$4
Yep that does the trick
Thanks for being awesome and helping out, Kim! #h5yr!
is working on a reply...