okanagan
asked on
URLMappings work on localhost but not server IIS
Hi -
I'm using URL mapping to try and give a bunch of franchisees unique URL's, like this:
<add url="~/Oahu" mappedUrl="~/Default.aspx? FranchiseI D=91" />
This works fine locally (Vista, IIS 7) but not the server (Win 2003, IIS 6). If I change the above statement to:
<add url="~/Oahu/Default.aspx" mappedUrl="~/Default.aspx? FranchiseI D=91" />
...it will work fine on the server as well. Only when I specify the page name will it work - just naming the directory gives me the 404.
Any Ideas?
Thanks,
Rod
I'm using URL mapping to try and give a bunch of franchisees unique URL's, like this:
<add url="~/Oahu" mappedUrl="~/Default.aspx?
This works fine locally (Vista, IIS 7) but not the server (Win 2003, IIS 6). If I change the above statement to:
<add url="~/Oahu/Default.aspx" mappedUrl="~/Default.aspx?
...it will work fine on the server as well. Only when I specify the page name will it work - just naming the directory gives me the 404.
Any Ideas?
Thanks,
Rod
did you setup the default documents in IIS 6 to recognize default.aspx? I think the defaults out of the box are default.asp (no x).
ASKER
Yes, in fact Default.aspx is the only default document it is set to recognize.
First question ... what is the problem with specifying the file name? You would probably only want to redirect a single page under normal circumstances.
take a look at this page ... http://improve.dk/blog/2006/12/11/making-url-rewriting-on-iis7-work-like-iis6
Apparently they changed the URL Mapping from IIS 6 to 7 ...
The good news is that IIS 6 supports wild cards ... try this ...
<add url="~/Oahu/*" mappedUrl="~/Default.aspx? FranchiseI D=91" />
take a look at this page ... http://improve.dk/blog/2006/12/11/making-url-rewriting-on-iis7-work-like-iis6
Apparently they changed the URL Mapping from IIS 6 to 7 ...
The good news is that IIS 6 supports wild cards ... try this ...
<add url="~/Oahu/*" mappedUrl="~/Default.aspx?
ASKER
Tried it, with no luck - it still works fine on my localhost (IIS 7), but not the IIS 6 host on my server. The reason I wanted this rather than specifying a page name was just for simplicity - it is easier for franchisees and their clients to remember a directory name based on their city or area than to have to remember the "Default.aspx" page name as well.
I'm using a virtual dedicated host for this project. Would there be any mappings in IIS that I could change or add to make this work?
Thanks for the help...
I'm using a virtual dedicated host for this project. Would there be any mappings in IIS that I could change or add to make this work?
Thanks for the help...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.