URLReWrite Help. - I'm stuck

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 yıl önce
hello

i have made some modifications to nopCommerce to support multiple themmes and each theme can have its own masterpages, pages and controls.
obviously to do this i had to add a directory sructure like this :
ROOT\Themes\theme1\
ROOT\Themes\theme1\Masterpages
ROOT\Themes\theme1\default.aspx
ROOT\Themes\theme1\contactus.aspx
...
...

the site always starts at the root'default.aspx then determines the theme used and redirects the browser to the correct url
all the above is working like a charm but i am not happy with the resulting url which is :

http:\\www.site.com\themes\theme1\default.aspx


the question is , how can i modify the urlrewrite code or config rules to make the reulting url appear like this :
http://www.site.com/default.aspx

and obviously treats all the subsequent pages and virtual urls correctly.

thank you for your help.
14 yıl önce
Hi,

What I think would be the best option in this scenario is instead of using a url rewrite to default.aspx which will encounter problems.

What I would do is keep it the same way you are doing things and simply move the ROOT\Themes\theme1\default.aspx and ROOT\Themes\theme1\contactus.aspx to the root of the site and change the names to lets say ROOT\Theme.aspx and ROOT\ThemeContactUs.aspx and then link these pages to your master page and relative css files within the theme folder?

Hope that make sense and helps.

mike..
14 yıl önce
hi mike. thanks for the repy.

I actually thought of that but was not convinced it was the right approach , neither is the one i have implemented at this point. but at least your suggestion can solve my urlrewriting issue...

There are shopping carts that have done this before and it works pretty fine. take znode for example. they have done it. all the masterpages, pages, modules and user controls are stored in structured directories under a themes main directory. it is fully transparent to the user and all the user sees is domain.com\default.aspx or page.aspx ...

i probably need to spend some time on this to better code it but need to think about the next upgrade compatibility...

thanks for the reply.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.