I have a URL rewriting rule that maps all incoming .htm requests to .aspx this works really well except when it comes to the backend and things like the tinyMCE html view dont work because the file is .htm
Yes, you just need to ensure that the matched path doesn't have /umbraco/ in the string, using regexp backreferences. Here's an example rule where I match for something with htm except for in the umbraco folder:
Hi tim thanks! i think that is almost it however that caused a faild to execute URL can i confirm that when the URL is matched with the excluded directory does the rewrite just cancel or does it try and rewrite to seomthing else?
URL rewriting exclude directories
Hello all
I have a URL rewriting rule that maps all incoming .htm requests to .aspx this works really well except when it comes to the backend and things like the tinyMCE html view dont work because the file is .htm
my rule looks like this:
<add name="catchAll"
redirect="Domain"
ignoreCase="true" rewriteUrlParameter="ExcludeFromClientQueryString"
virtualUrl="http://www.domain.com/(.*).htm"
redirectMode="Permanent"
destinationUrl="http://www.domain.com/$1.aspx" />
Is there a way to exclude areas from this rewriting rule? so that it doesnt interfeed with backend stuff?
thanks
L
Yes, you just need to ensure that the matched path doesn't have /umbraco/ in the string, using regexp backreferences. Here's an example rule where I match for something with htm except for in the umbraco folder:
<add name="rewriteHtm"
virtualUrl="^~/((?!umbraco/).htm)$"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/$1.aspx" redirect="Application"
ignoreCase="true" redirectMode="Permanent"/>
Hope that helps!
:)
Hi tim thanks! i think that is almost it however that caused a faild to execute URL can i confirm that when the URL is matched with the excluded directory does the rewrite just cancel or does it try and rewrite to seomthing else?
L
is working on a reply...