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
I need a bit of help with some UrlRewriting. Basically I need to strip a directory from the URL, but I can't get it to work.
The URL's look like this:
http://www.websitename/realisaties/categoryname1.aspx
http://www.websitename/realisaties/categoryname/item1.aspx
and the resulting URL's should look like:
http://www.websitename/categoryname1.aspx
http://www.websitename/categoryname/item1.aspx
You get the idea. "realisaties" needs to go.
So far I have what is below, but it doesn't work. I get 404 errors on the pages.
<add name="realisaties"
virtualUrl="^~/realisaties/(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/$1"
ignoreCase="true"
/>
Does anybody have any insight they would like to share with me? I'm obviously not seeing something...
thanks,
Jan
Did you touch the web.config or recycle the apppool to get your updated urlrewriting.config looked at?
Yes I did both, but no luck. I'm guessing there's a syntax error somewhere, but can't figure out what ....
do you get a page served if you navigate direct to the destination page?
That returns a 404 page
So that suggests it's not you rul rewriting that is at fault ;-), as the page you are trying to rewrite to is a 404...
Yes I believe I explained myself wrong.
I want http://www.websitename/categoryname/item1.aspx to display www.websitename/realisaties/categoryname1.aspx but I don't want it to redirect...
I thought of using umbracoUrlAlias but that's not really a viable option since there's over 200 pages already, and the client is adding new ones everyday. Explaining to him he needs to add the umbracoUrlAlias isn't an option...
so it's the other way round then... but you need something unique in the first url... perhaps category name?
<add name="categoryname"
virtualUrl="^~/(categoryname/.*)"
destinationUrl="~/realisaties/$1"
perhaps?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Need some UrlRewriting assistance...
I need a bit of help with some UrlRewriting. Basically I need to strip a directory from the URL, but I can't get it to work.
The URL's look like this:
http://www.websitename/realisaties/categoryname1.aspx
http://www.websitename/realisaties/categoryname/item1.aspx
and the resulting URL's should look like:
http://www.websitename/categoryname1.aspx
http://www.websitename/categoryname/item1.aspx
You get the idea. "realisaties" needs to go.
So far I have what is below, but it doesn't work. I get 404 errors on the pages.
<add name="realisaties"
virtualUrl="^~/realisaties/(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/$1"
ignoreCase="true"
/>
Does anybody have any insight they would like to share with me? I'm obviously not seeing something...
thanks,
Jan
Did you touch the web.config or recycle the apppool to get your updated urlrewriting.config looked at?
Yes I did both, but no luck. I'm guessing there's a syntax error somewhere, but can't figure out what ....
http://www.websitename/categoryname/item1.aspx
do you get a page served if you navigate direct to the destination page?
That returns a 404 page
So that suggests it's not you rul rewriting that is at fault ;-), as the page you are trying to rewrite to is a 404...
Yes I believe I explained myself wrong.
I want http://www.websitename/categoryname/item1.aspx to display www.websitename/realisaties/categoryname1.aspx but I don't want it to redirect...
I thought of using umbracoUrlAlias but that's not really a viable option since there's over 200 pages already, and the client is adding new ones everyday. Explaining to him he needs to add the umbracoUrlAlias isn't an option...
so it's the other way round then... but you need something unique in the first url... perhaps category name?
<add name="categoryname"
virtualUrl="^~/(categoryname/.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/realisaties/$1"
ignoreCase="true"
/>
perhaps?
is working on a reply...