Posted - 02/14/2025 : 09:14:14
Hello, I managed to make the SEO friendly URLs to work for the products.asp and categories.asp pages. the eshop in under the /de/ directory, not in wwwroot. In both of these pages i have before the <head> this line: <base href="http<% if request.servervariables("HTTPS")="on" then response.write "s"%>://www.mydomain.com/de/" /> in the web.config, i have these (I added the de/ in front of categories.asp, products.asp and proddetail.asp in order for redirection to work): <rule name="Categories Match" stopProcessing="true"> <match url="^category/([^/]*)/?$" /> <action type="Rewrite" url="de/categories.asp?cat={UrlEncode:{R:1}}" /> </rule> <rule name="Product Match" stopProcessing="true"> <match url="^products/([^/]*)/?$" /> <action type="Rewrite" url="de/products.asp?cat={UrlEncode:{R:1}}" /> </rule> <rule name="Manufacturer Match" stopProcessing="true"> <match url="^manufacturer/([^/]*)/?$" /> <action type="Rewrite" url="de/products.asp?man={UrlEncode:{R:1}}" /> </rule> <rule name="Product Detail Page Match" stopProcessing="true"> <match url="^([^/]+)/?$" /> <conditions> <add input="{URL}" pattern="\.asp" negate="true" /> <add input="{URL}" pattern="\.css" negate="true" /> <add input="{URL}" pattern="\.gif" negate="true" /> <add input="{URL}" pattern="\.jpg" negate="true" /> <add input="{URL}" pattern="\.js" negate="true" /> <add input="{URL}" pattern="\.png" negate="true" /> <add input="{URL}" pattern="\.xml" negate="true" /> <add input="{URL}" pattern="robots\.txt" negate="true" /> <add input="{UNENCODED_URL}" pattern="[^/]+" /> </conditions> <action type="Rewrite" url="de/proddetail.asp?prod={UrlEncode:{R:1}}" /> </rule>
in includes.asp i added these lines: seodetailurls=TRUE seocategoryurls=TRUE detlinkspacechar="-" seocaturlpattern="/category/%s" seoprodurlpattern="/products/%s" seomanufacturerpattern="/manufacturer/%s" seourlsthrow301=TRUE
The only issue is with proddetail.asp page...When i click on any product, it takes me to homepage...something is not working with the redirection. Can you please help? Thanks a lot Best regards, Harry
|