Welcome Guest Search | Active Topics | Members | Log In | Register

URL Rewriter not working, maybe... Options
afagcaoili
Posted: Thursday, August 21, 2008 2:03:27 PM
Rank: Member

Joined: 4/28/2008
Posts: 17
Location: Brush, CO
Paul,

Maybe I just do not know how to make it work but when you have the sitelockdirpath inside a folder say www.yoursite.com/store and put the storefront at www.yoursite.com/store/storefront the URL Rewriter seems to be failing. It gives you this error.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /store/StoreFront/Store_Cat2_Test.aspx

This is the error when you click any of the categories. If you put the products.aspx?cat_id=1 it works but the rewrited url is not. But if I put the storefront to www.yoursite.com/storefront and keep the sitelock where it is, it is fine.

Thanks.

Arnold
D2Admin
Posted: Thursday, August 21, 2008 2:08:34 PM

Rank: Administration

Joined: 9/6/2007
Posts: 152
If you altered the dir name then you'd have to alter the following keys at the bottom of your web.config file:

<rewriter>
<rewrite url="^~/storefront/(.+)?Store_Prod([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/storefront/ViewProduct.aspx?ProdID=$2" processing="stop"/>
<rewrite url="^~/storefront/(.+)?Store_Content([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/storefront/Content.aspx?PageID=$2" processing="stop"/>
<rewrite url="^~/storefront/(.+)?Store_Cat([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/storefront/Products.aspx?CatID=$2" processing="stop"/>
</rewriter>

(so in your case: rewrite url="^~/store/(.+)?Store_Prod([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/store/ViewProduct.aspx?ProdID=$2" processing="stop"/>)

Paul
afagcaoili
Posted: Thursday, August 21, 2008 7:58:38 PM
Rank: Member

Joined: 4/28/2008
Posts: 17
Location: Brush, CO
Hi Paul,

But it will still be under storefront. It will just be inside another folder. wouldn't it be like this?

<rewrite url="^~/store/storefront/(.+)?Store_Cat([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/store/storefront/Products.aspx?CatID=$2" processing="stop"/>

the storefront is inside the store folder. So the storefront will still be there but the just under the store folder. I think I am repeating myself. :-)

I haven't tested your suggestion yet but i would like to confirm.

Thanks.

Arnold
D2Admin
Posted: Wednesday, August 27, 2008 2:57:18 AM

Rank: Administration

Joined: 9/6/2007
Posts: 152
afagcaoili wrote:
Hi Paul,

But it will still be under storefront. It will just be inside another folder. wouldn't it be like this?

<rewrite url="^~/store/storefront/(.+)?Store_Cat([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/store/storefront/Products.aspx?CatID=$2" processing="stop"/>

the storefront is inside the store folder. So the storefront will still be there but the just under the store folder. I think I am repeating myself. :-)

I haven't tested your suggestion yet but i would like to confirm.

Thanks.

Arnold


Yes, if thats the case then it would be something like that. You'd just have to experiment to see what works for that folder layout.

Paul
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

SoClean Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1 (NET v2.0) - 9/1/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.