Products » Support Forums 

Support Forums

HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl MasterMissing pages in subdirectories being redirected (and shouldnMissing pages in subdirectories being redirected (and shouldn't be)
Previous
 
Next
New Post
12/15/2009 4:04 PM
 

I have the purchase version of URL Master and have it setup to 404 redirect if there is a missing page.  I also have a custom 404 set in the web.config.  For non-existent pages in the root, it works fine.  That is, it redirects to my custom 404 properly.  But if I request a URL in a subdirectory that doesn't exist, I am redirected to the root page of that subdirectory.  e.g. www.domain.com/nopage.aspx goes to my custom 404 but www.domain.com/subdir/nopage.aspx goes to www.domain.com/subdir.aspx 

I need all missing pages to go through my custom 404.  What am I doing wrong?

 

Here are the entries from web.config

<add name="iFinity.UrlMaster" type="iFinity.DNN.Modules.UrlMaster.DNNFriendlyUrlProvider, iFinity.UrlMaster.FriendlyUrlProvider" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly" redirectUnfriendly="false" doNotRewriteRegex="/DesktopModules/|/Providers/|/LinkClick\.aspx" doNotRedirectRegex="" doNotRedirectSecureRegex="" pageExtensionUsage="AlwaysUse" pageExtension=".aspx" parameterHandling="OrderedParameters" ignoreFileTypesRegex="(?&lt;!linkclick\.aspx.+)(?:\.pdf$|\.gif$|\.png($|\?)|\.css$|\.js($|\?)|\.jpg$|\.html$|\.htm$|\.axd($|\?)|\.swf$|\.flv$|\.ico$|\.xml($|\?))" checkForDupUrls="true" forceLowerCase="false" spaceEncodingValue="%20" redirectWrongCase="false" rebaseClientPath="false" replaceSpaceWith="_" autoAsciiConvert="false" triggerDictionaryRebuildRegex="&amp;ctl=tab|/ctl/tab|/Admin/Tabs/|/ctl/Signup" useBaseFriendlyUrls="/SearchResults;/ModuleDefinitions;" deletedTabHandling="Do404Error" doNotRedirect="" sslClientRedirect="True" logCacheMessages="False" cachePersistRestart="False" cacheTime="1440" />

<httpErrors errorMode="DetailedLocalOnly" defaultPath="/404.aspx" defaultResponseMode="ExecuteURL">
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/404.aspx" responseMode="ExecuteURL" />
    </httpErrors>

<customErrors mode="RemoteOnly">
      <error statusCode="404" redirect="~/404.aspx" />
    </customErrors>

 
New Post
12/16/2009 12:48 AM
 

Doug - this behaviour is by design.  It's based on the way the rewriting works.  When you have a page with a third party module on it, the rewriter inspects the url and finds a match with a known tab path.   Anything else after the part of the url that matches the tab path is considered to be a query string.

So, if you have a page called /path1 and you request /path1/nopage.aspx, then you'll get the /path1 page returned as normal.  The /nopage part of the path will be treated as a querystring. 

At the moment, there's nothing much you can do about it, except for create a page matching the path you want to 404, then deleting that page.  This would then match and produce a 404 under the rule for deleted tab handling.

Mostly it's not important unless someone links to a non-existent page.  I am looking at ways to handle this better for future releases, but the problem is a tricky one.  One one hand it's necessary to maintain flexibility of the Url scheme so that new additions to the site will work OK, on the other, some people want to lock down the urls very tightly. 

My suggestion is that if you have a particular page which is being linked, then create/delete a page for that url, (or set up a redirect to handle the url), otherwise, it's not likely to be a big issue.

 
Previous
 
Next
HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl MasterMissing pages in subdirectories being redirected (and shouldnMissing pages in subdirectories being redirected (and shouldn't be)


Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.

Please note : If you are posting a new thread for the Url Master module, please include the following information where applicable:

- Url Master version

- DotNetNuke version

- Example Url where possible

- If there is an error, please post the full error text and/or stack trace (from the DotNetNuke event log).